Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryAdapter.java

Issue 29530589: Issue 5592 - Remove synced devices from history (Closed)
Patch Set: Created Aug. 29, 2017, 3:44 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryAdapter.java
===================================================================
--- a/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryAdapter.java
+++ b/mobile/android/base/java/org/mozilla/gecko/home/CombinedHistoryAdapter.java
@@ -81,17 +81,17 @@ public class CombinedHistoryAdapter exte
}
public DevicesUpdateHandler getDeviceUpdateHandler() {
if (devicesUpdateHandler == null) {
devicesUpdateHandler = new DevicesUpdateHandler() {
@Override
public void onDeviceCountUpdated(int count) {
deviceCount = count;
- notifyItemChanged(getSyncedDevicesSmartFolderIndex());
+ // Removed notifyItemChanged call. See https://issues.adblockplus.org/ticket/5592
}
};
}
return devicesUpdateHandler;
}
public interface RecentTabsUpdateHandler {
void onRecentTabsCountUpdated(int count, boolean countReliable);
@@ -167,17 +167,18 @@ public class CombinedHistoryAdapter exte
@UiThread
private boolean isRecentTabsFolderVisible() {
return recentTabsCount > 0;
}
@UiThread
// Number of smart folders for determining practical empty state.
public int getNumVisibleSmartFolders() {
- int visibleFolders = 1; // Synced devices folder is always visible.
+ // Synced devices folder is always hidden. See https://issues.adblockplus.org/ticket/5592
+ int visibleFolders = 0;
if (isRecentTabsFolderVisible()) {
visibleFolders += 1;
}
return visibleFolders;
}
@@ -261,17 +262,18 @@ public class CombinedHistoryAdapter exte
}
}
@UiThread
private CombinedHistoryItem.ItemType getItemTypeForPosition(int position) {
if (position == RECENT_TABS_SMARTFOLDER_INDEX && isRecentTabsFolderVisible()) {
return CombinedHistoryItem.ItemType.RECENT_TABS;
}
- if (position == getSyncedDevicesSmartFolderIndex()) {
+ // We never show the synced devices item. See https://issues.adblockplus.org/ticket/5592
+ if (false) {
return CombinedHistoryItem.ItemType.SYNCED_DEVICES;
}
final int sectionPosition = transformAdapterPositionForDataStructure(CombinedHistoryItem.ItemType.SECTION_HEADER, position);
if (sectionHeaders.get(sectionPosition) != null) {
return CombinedHistoryItem.ItemType.SECTION_HEADER;
}
return CombinedHistoryItem.ItemType.HISTORY;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld