Fix doubling of channel listing
Test: toggle a notification group on/off Change-Id: Ia93cf8084aee0c886a591301cba764975e5e0147 Fixes: 124384280
This commit is contained in:
@@ -255,7 +255,7 @@ public class AppNotificationSettings extends NotificationSettingsBase {
|
|||||||
int childCount = groupGroup.getPreferenceCount();
|
int childCount = groupGroup.getPreferenceCount();
|
||||||
for (int i = 0; i < childCount; i++) {
|
for (int i = 0; i < childCount; i++) {
|
||||||
Preference pref = groupGroup.getPreference(i);
|
Preference pref = groupGroup.getPreference(i);
|
||||||
if (pref instanceof MasterCheckBoxPreference) {
|
if (pref instanceof ChannelSummaryPreference) {
|
||||||
toRemove.add(pref);
|
toRemove.add(pref);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -309,7 +309,9 @@ abstract public class NotificationSettingsBase extends DashboardFragment {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
parent.addPreference(channelPref);
|
if (parent.findPreference(channelPref.getKey()) == null) {
|
||||||
|
parent.addPreference(channelPref);
|
||||||
|
}
|
||||||
return channelPref;
|
return channelPref;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user