remove banned topic from view

This commit is contained in:
or-else
2019-02-26 16:48:13 +03:00
parent 0ddb3a4f75
commit 173d153b82
5 changed files with 11 additions and 8 deletions
+5 -2
View File
@@ -591,7 +591,7 @@ class TinodeWeb extends React.Component {
}
resetContactList() {
let newState = {
const newState = {
chatList: []
};
this.tinode.getMeTopic().contacts((c) => {
@@ -759,6 +759,9 @@ class TinodeWeb extends React.Component {
topic.setMeta({sub: {user: topicName, mode: 'N'}});
});
}
response = response.then((ctrl) => {
this.handleTopicSelected(null);
});
break;
default:
console.log("Unknown invitation action", '"' + action + '""');
@@ -1080,7 +1083,7 @@ class TinodeWeb extends React.Component {
subscribed ? {title: formatMessage({id: 'menu_item_info'}), handler: this.handleShowInfoView} : null,
subscribed ? 'messages_clear' : null,
subscribed && deleter ? 'messages_clear_hard' : null,
muted ? 'topic_unmute' : 'topic_mute',
muted ? (blocked ? null : 'topic_unmute') : 'topic_mute'),
blocked ? 'topic_unblock' : 'topic_block',
!archived ? 'topic_archive' : null,
'topic_delete'
+3 -3
View File
@@ -2681,12 +2681,12 @@ var MessagesView = function (_React$Component) {
if (this.state.isReader) {
getQuery = getQuery.withLaterData(_config_js__WEBPACK_IMPORTED_MODULE_12__["MESSAGES_PAGE"]).withLaterDel();
}
var setQuery = tinode_sdk__WEBPACK_IMPORTED_MODULE_2___default.a.isNewGroupTopicName(this.props.topic) ? this.props.newGroupTopicParams : undefined;
this.setState({
fetchingMessages: true
});
}
var setQuery = tinode_sdk__WEBPACK_IMPORTED_MODULE_2___default.a.isNewGroupTopicName(this.props.topic) ? this.props.newGroupTopicParams : undefined;
topic.subscribe(getQuery.build(), setQuery).then(function (ctrl) {
if (_this2.state.topic != ctrl.topic) {
_this2.setState({
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long