[polari/wip/raresv/blankState: 4/4] chatView: only insert blank state after establishing a connection
- From: Rares Visalom <raresvisalom src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [polari/wip/raresv/blankState: 4/4] chatView: only insert blank state after establishing a connection
- Date: Thu, 26 Jan 2017 17:54:02 +0000 (UTC)
commit b378bba7167b4c7eae4f54c6182b38d4d54cfe06
Author: Rares Visalom <rares visalom gmail com>
Date: Sat Dec 17 00:43:03 2016 +0200
chatView: only insert blank state after establishing a connection
src/chatView.js | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/chatView.js b/src/chatView.js
index 21fce49..0380bab 100644
--- a/src/chatView.js
+++ b/src/chatView.js
@@ -365,8 +365,11 @@ const ChatView = new Lang.Class({
this._initialPending = [];
this._backlogTimeoutId = 0;
this._statusCount = { left: 0, joined: 0, total: 0 };
+ this._canBlankStateBeInserted = false;
this._isBlankStateInserted = false;
+ this._room.connect("notify::topic", () => {this._canBlankStateBeInserted = true;});
+
let statusMonitor = UserTracker.getUserStatusMonitor();
this._userTracker = statusMonitor.getUserTrackerForAccount(room.account);
@@ -751,7 +754,7 @@ const ChatView = new Lang.Class({
},
_fetchBacklog: function() {
- if (this._logWalker.is_end() && !this._isBlankStateInserted) {
+ if (this._logWalker.is_end() && !this._isBlankStateInserted && this._canBlankStateBeInserted) {
this._insertBlankState();
this._isBlankStateInserted = true;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]