Skip to content

Commit

Permalink
brave-stats hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikhil7174 committed Nov 4, 2024
1 parent 9e806c7 commit e71b990
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,8 @@ public void run() {

private void setNtpRecyclerView(LinearLayoutManager linearLayoutManager) {
mIsTopSitesEnabled = NtpUtil.shouldDisplayTopSites();
mIsBraveStatsEnabled = NtpUtil.shouldDisplayBraveStats();
// mIsBraveStatsEnabled = NtpUtil.shouldDisplayBraveStats();
mIsBraveStatsEnabled = false;

if (mNtpAdapter == null) {
if (mActivity != null && !mActivity.isDestroyed() && !mActivity.isFinishing()) {
Expand Down Expand Up @@ -883,7 +884,8 @@ private void initPreferenceObserver() {
mNtpAdapter.setTopSitesEnabled(mIsTopSitesEnabled);
} else if (TextUtils.equals(
key, BackgroundImagesPreferences.PREF_SHOW_BRAVE_STATS)) {
mIsBraveStatsEnabled = NtpUtil.shouldDisplayBraveStats();
// mIsBraveStatsEnabled = NtpUtil.shouldDisplayBraveStats();
mIsBraveStatsEnabled = false;
mNtpAdapter.setBraveStatsEnabled(mIsBraveStatsEnabled);
}
};
Expand Down
5 changes: 3 additions & 2 deletions android/java/org/chromium/chrome/browser/ntp/NtpUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ public static void setDisplayTopSites(boolean shouldDisplayTopSites) {
}

public static boolean shouldDisplayBraveStats() {
return ChromeSharedPreferences.getInstance()
.readBoolean(BackgroundImagesPreferences.PREF_SHOW_BRAVE_STATS, true);
// return ChromeSharedPreferences.getInstance()
// .readBoolean(BackgroundImagesPreferences.PREF_SHOW_BRAVE_STATS, true);
return false;
}

public static void setDisplayBraveStats(boolean shouldDisplayBraveStats) {
Expand Down

0 comments on commit e71b990

Please sign in to comment.