Sort Uncategorized channel to the bottom.
Bug: 64803214 Test: manual, with Duo app Change-Id: I8e39fbed4ecda2efebb4606f38ea934647317207
This commit is contained in:
@@ -355,7 +355,13 @@ abstract public class NotificationSettingsBase extends DashboardFragment {
|
|||||||
(left, right) -> {
|
(left, right) -> {
|
||||||
if (left.isDeleted() != right.isDeleted()) {
|
if (left.isDeleted() != right.isDeleted()) {
|
||||||
return Boolean.compare(left.isDeleted(), right.isDeleted());
|
return Boolean.compare(left.isDeleted(), right.isDeleted());
|
||||||
|
} else if (left.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
|
||||||
|
// Uncategorized/miscellaneous legacy channel goes last
|
||||||
|
return 1;
|
||||||
|
} else if (right.getId().equals(NotificationChannel.DEFAULT_CHANNEL_ID)) {
|
||||||
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return left.getId().compareTo(right.getId());
|
return left.getId().compareTo(right.getId());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user