diff --git a/js/background.js b/js/background.js index fc0c6d215..ebc613361 100644 --- a/js/background.js +++ b/js/background.js @@ -580,7 +580,6 @@ nickname: displayName, onOk: async (newName) => { await storage.setProfileName(newName); - appView.inboxView.trigger('updateProfile'); // Update the conversation if we have it const conversation = ConversationController.get(ourNumber); diff --git a/js/models/conversations.js b/js/models/conversations.js index b5574d5a1..98ff31c89 100644 --- a/js/models/conversations.js +++ b/js/models/conversations.js @@ -1621,12 +1621,12 @@ await this.updateProfile(); }, async setProfile(profile) { - if (_.isEqual(this.get('profile'), profile)) return; - - this.set({ profile }); - await window.Signal.Data.updateConversation(this.id, this.attributes, { - Conversation: Whisper.Conversation, - }); + if (!_.isEqual(this.get('profile'), profile)) { + this.set({ profile }); + await window.Signal.Data.updateConversation(this.id, this.attributes, { + Conversation: Whisper.Conversation, + }); + } await this.updateProfile(); },