Merge pull request #137 from Mikunj/fix/friend-display

Fix contact display
pull/139/head
Beaudan Campbell-Brown 6 years ago committed by GitHub
commit 1b681bdc98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -82,7 +82,7 @@
initialize() {
this.on('change:timestamp change:name change:number change:profileName', this.sort);
this.listenTo(conversations, 'add change:active_at', this.addActive);
this.listenTo(conversations, 'add change:active_at change:friendRequestStatus', this.addActive);
this.listenTo(conversations, 'reset', () => this.reset([]));
this.collator = new Intl.Collator();

@ -2166,6 +2166,7 @@
messageSentAt: Date.now(),
title: i18n(title),
isFriendRequest: true,
friendRequestType: type,
});
},

@ -100,8 +100,15 @@
const last = this.last().toJSON();
switch (userSetting) {
case SettingNames.COUNT:
title = 'Signal';
message = newMessageCountLabel;
title = 'Loki Messenger';
if (last.isFriendRequest) {
message = `Friend request ${last.friendRequestType}`;
} else if (messagesNotificationCount > 0) {
message = newMessageCountLabel;
} else {
return;
}
break;
case SettingNames.NAME: {
const lastMessageTitle = last.title;

Loading…
Cancel
Save