weechatRN

Weechat relay client for iOS using websockets https://github.com/mhoran/weechatRN
git clone http://git.hanabi.in/repos/weechatRN.git
Log | Files | Refs | README | LICENSE

commit 8df7195937a925126cd192e56771fb551217ad68
parent 5bcb7c7fb2967c5b5e1b3ef067762d5bd111d5f3
Author: Matthew Horan <matt@matthoran.com>
Date:   Sat, 27 Oct 2018 21:03:02 -0400

Don't increase hotlist count for filtered lines

If one has configured a smart filter, or a message comes through with
the notify_none tag [1], then the hostlist count should not increase.

[1] https://www.weechat.org/files/doc/stable/weechat_user.en.html#lines_tags

Diffstat:
Msrc/store/hotlists.ts | 11++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/store/hotlists.ts b/src/store/hotlists.ts @@ -21,10 +21,15 @@ export default (state: HotListState = initialState, action): HotListState => { ...getHotlistForBufferId(state, action.bufferId) }; - if (payload.highlight !== 0) { - hotlist.highlight++; + const shouldNotify = (tag) => ( + tag != "irc_smart_filter" && tag != "notify_none" + ); + if (payload.tags_array.every(shouldNotify)) { + if (payload.highlight !== 0) { + hotlist.highlight++; + } + hotlist.sum++; } - hotlist.sum++; return { ...state,