Archive Conversation

This commit is contained in:
Scott Nonnenberg 2019-03-11 17:20:16 -07:00
parent d72f89d776
commit 6ffbc0ac06
20 changed files with 568 additions and 109 deletions

View file

@ -185,9 +185,12 @@
profileName: this.model.getProfileName(),
color: this.model.getColor(),
avatarPath: this.model.getAvatarPath(),
isVerified: this.model.isVerified(),
isMe: this.model.isMe(),
isGroup: !this.model.isPrivate(),
isArchived: this.model.get('isArchived'),
expirationSettingName,
showBackButton: Boolean(this.panels && this.panels.length),
timerOptions: Whisper.ExpirationTimerOptions.map(item => ({
@ -217,6 +220,14 @@
this.resetPanel();
this.updateHeader();
},
onArchive: () => {
this.unload();
this.model.setArchived(true);
},
onMoveToInbox: () => {
this.model.setArchived(false);
},
};
};
this.titleView = new Whisper.ReactWrapperView({

View file

@ -220,7 +220,7 @@
window.location.reload();
},
async openConversation(id, messageId) {
const conversation = await window.ConversationController.getOrCreateAndWait(
const conversation = await ConversationController.getOrCreateAndWait(
id,
'private'
);