archiving works, refactored UNSAFE_componentWillReceiveProps in chips-input

This commit is contained in:
or-else
2019-02-06 20:08:50 +03:00
parent 160e2574d4
commit 87947b3de6
12 changed files with 313 additions and 142 deletions
+11
View File
@@ -104,6 +104,7 @@ class TinodeWeb extends React.Component {
this.handleValidateCredentialsRequest = this.handleValidateCredentialsRequest.bind(this);
this.handlePasswordResetRequest = this.handlePasswordResetRequest.bind(this);
this.handleResetPassword = this.handleResetPassword.bind(this);
this.handleContextMenuAction = this.handleContextMenuAction.bind(this);
}
getBlankState() {
@@ -1049,6 +1050,16 @@ class TinodeWeb extends React.Component {
});
}
handleContextMenuAction(action, promise, params) {
if (action == 'topic_archive') {
if (promise && params.topicName && params.topicName == this.state.topicSelected) {
promise.then(() => {
this.handleTopicSelected(null);
});
}
}
}
handleShowInfoView() {
HashNavigation.navigateTo(HashNavigation.addUrlParam(window.location.hash, 'info', true));
this.setState({showInfoPanel: true});