From 9432004c5e0db0424c259338b510f7d1075f9551 Mon Sep 17 00:00:00 2001 From: Tor Hveem Date: Mon, 23 Mar 2015 13:32:02 +0100 Subject: [PATCH] Clear hotlist in more scenarios * Clear when switching away from a buffer * Clear when sending a message to a buffer --- js/glowingbear.js | 5 +++++ js/inputbar.js | 3 +++ 2 files changed, 8 insertions(+) diff --git a/js/glowingbear.js b/js/glowingbear.js index 0ed3764..fa03b2f 100644 --- a/js/glowingbear.js +++ b/js/glowingbear.js @@ -436,6 +436,11 @@ weechat.controller('WeechatCtrl', ['$rootScope', '$scope', '$store', '$timeout', if (utils.isMobileUi()) { $scope.hideSidebar(); } + + // Clear the hotlist for this buffer, because presumable you have read + // the messages in this buffer before you switched to the new one + connection.sendHotlistClear(); + return models.setActiveBuffer(bufferId, key); }; diff --git a/js/inputbar.js b/js/inputbar.js index 6f6daf0..c0ec77e 100644 --- a/js/inputbar.js +++ b/js/inputbar.js @@ -104,6 +104,9 @@ weechat.directive('inputBar', function() { $scope.command = ''; } + // Presumable we are reading the messages if we are sending. + connection.sendHotlistClear(); + $scope.getInputNode().focus(); };