Sort channels and groups by id
Test: manual Change-Id: I3949e9eb7b901bd897d848627682878937aac0c1
This commit is contained in:
@@ -269,11 +269,6 @@ public class AppNotificationSettings extends NotificationSettingsBase {
|
|||||||
if (left.isDeleted() != right.isDeleted()) {
|
if (left.isDeleted() != right.isDeleted()) {
|
||||||
return Boolean.compare(left.isDeleted(), right.isDeleted());
|
return Boolean.compare(left.isDeleted(), right.isDeleted());
|
||||||
}
|
}
|
||||||
CharSequence leftName = left.getName();
|
|
||||||
CharSequence rightName = right.getName();
|
|
||||||
if (!Objects.equals(leftName, rightName)) {
|
|
||||||
return sCollator.compare(leftName.toString(), rightName.toString());
|
|
||||||
}
|
|
||||||
return left.getId().compareTo(right.getId());
|
return left.getId().compareTo(right.getId());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@@ -290,12 +285,6 @@ public class AppNotificationSettings extends NotificationSettingsBase {
|
|||||||
} else if (right.getId() == null && left.getId() != null) {
|
} else if (right.getId() == null && left.getId() != null) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
CharSequence leftName = left.getName();
|
|
||||||
CharSequence rightName = right.getName();
|
|
||||||
// sort rest of the groups by name
|
|
||||||
if (!Objects.equals(leftName, rightName)) {
|
|
||||||
return sCollator.compare(leftName.toString(), rightName.toString());
|
|
||||||
}
|
|
||||||
return left.getId().compareTo(right.getId());
|
return left.getId().compareTo(right.getId());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user