From 1a3362f1cdf9ef6c220aff84d424e873f8bf3d38 Mon Sep 17 00:00:00 2001 From: or-else Date: Tue, 5 Dec 2017 22:23:18 -0800 Subject: [PATCH] fix online status --- index.html | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 1c368491..546e2a38 100644 --- a/index.html +++ b/index.html @@ -336,7 +336,7 @@ return; } var promise = all ? - topic.delMessagesAll(hard) : + topic.delMessagesAll(hard) : topic.delMessagesList([params.seq], hard); promise.catch(function(err) { if (errorHandler) { @@ -1405,7 +1405,7 @@ e.preventDefault(); e.stopPropagation(); if (this.props.onSelected) { - this.props.onSelected(this.props.item, this.props.index); + this.props.onSelected(this.props.item, this.props.index, this.props.now); } }, @@ -3402,20 +3402,22 @@ }, // User clicked on a contact in the side panel or deleted a contact. - handleTopicSelected: function(topicName) { + handleTopicSelected: function(topicName, unused_index, online) { if (topicName) { // Contact selected this.setState({ topicSelected: topicName, mobilePanel: 'topic-view', - showInfoPanel: false + showInfoPanel: false, + topicSelectedOnline: online }); } else { // Currently selected contact deleted this.setState({ topicSelected: null, mobilePanel: 'sidepanel', - showInfoPanel: false + showInfoPanel: false, + topicSelectedOnline: false }); } }, @@ -3573,7 +3575,7 @@ } var instance = this; topic.leave(true).then(function(ctrl) { - // Hide MessageView and InfoView panels. + // Hide MessagesView and InfoView panels. instance.setState({ topicSelected: '', showInfoPanel: false,