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() { initialize() {
this.on('change:timestamp change:name change:number change:profileName', this.sort); 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.listenTo(conversations, 'reset', () => this.reset([]));
this.collator = new Intl.Collator(); this.collator = new Intl.Collator();

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

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

Loading…
Cancel
Save