Merge pull request #3765 from thelounge/xpaw/showinactive-unread

Fix incorrectly updating unread counter for 'show in active' messages
This commit is contained in:
Pavel Djundik 2020-02-18 18:01:32 +02:00 committed by GitHub
commit 258db10ea9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ socket.on("msg", function(data) {
}
let channel = receivingChannel.channel;
const isActiveChannel =
let isActiveChannel =
store.state.activeChannel && store.state.activeChannel.channel === channel;
// Display received notices and errors in currently active channel.
@ -37,6 +37,10 @@ socket.on("msg", function(data) {
) {
channel = store.state.activeChannel.channel;
// Do not update unread/highlight counters for this channel
// as we are putting this message in the active channel
isActiveChannel = true;
if (data.chan === channel.id) {
// If active channel is the intended channel for this message,
// remove the showInActive flag