|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
/* global Whisper, $, getAccountManager, textsecure */
|
|
|
|
|
/* global Whisper, $, getAccountManager, textsecure, storage, ConversationController */
|
|
|
|
|
|
|
|
|
|
/* eslint-disable more/no-then */
|
|
|
|
|
|
|
|
|
@ -47,7 +47,17 @@
|
|
|
|
|
this.accountManager
|
|
|
|
|
.registerSingleDevice(
|
|
|
|
|
this.$('#mnemonic').val(),
|
|
|
|
|
this.$('#mnemonic-language').val()
|
|
|
|
|
this.$('#mnemonic-language').val(),
|
|
|
|
|
async (pubKey) => {
|
|
|
|
|
await storage.setProfileName(this.$('#display-name').val());
|
|
|
|
|
|
|
|
|
|
// Update the conversation if we have it
|
|
|
|
|
const conversation = ConversationController.get(pubKey);
|
|
|
|
|
if (conversation) {
|
|
|
|
|
const newProfile = storage.getLocalProfile();
|
|
|
|
|
conversation.setProfile(newProfile);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
.then(() => {
|
|
|
|
|
this.$el.trigger('openInbox');
|
|
|
|
|