Removes some Backbone views

This commit is contained in:
Josh Perez 2021-06-17 17:15:09 -04:00 committed by GitHub
parent 93bc094342
commit 94d116c621
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 160 additions and 656 deletions

View file

@ -5405,23 +5405,3 @@ const sortConversationTitles = (
) => {
return collator.compare(left.getTitle(), right.getTitle());
};
// We need a custom collection here to get the sorting we need
window.Whisper.GroupConversationCollection = window.Backbone.Collection.extend({
model: window.Whisper.GroupMemberConversation,
initialize() {
this.collator = new Intl.Collator(undefined, { sensitivity: 'base' });
},
comparator(left: WhatIsThis, right: WhatIsThis) {
if (left.isAdmin && !right.isAdmin) {
return -1;
}
if (!left.isAdmin && right.isAdmin) {
return 1;
}
return sortConversationTitles(left, right, this.collator);
},
});