Let group update happen on relink

This commit is contained in:
Fedor Indutny 2021-05-07 13:07:24 -07:00 committed by GitHub
parent 97fe907483
commit 98894ab121
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 33 additions and 7 deletions

View file

@ -52,6 +52,14 @@
// Make sure poppers are positioned properly
window.dispatchEvent(new Event('resize'));
},
unload() {
const { lastConversation } = this;
if (!lastConversation) {
return;
}
lastConversation.trigger('unload', 'force unload requested');
},
onUnload(conversation) {
if (this.lastConversation === conversation) {
this.stopListening(this.lastConversation);
@ -93,6 +101,12 @@
}
});
// Close current opened conversation to reload the group information once
// linked.
Whisper.events.on('setupAsNewDevice', () => {
this.conversation_stack.unload();
});
if (!options.initialLoadComplete) {
this.appLoadingScreen = new Whisper.AppLoadingScreen();
this.appLoadingScreen.render();