Merge pull request #3347 from thelounge/xpaw/focus-on-special-upd
Open list channel on data updates
This commit is contained in:
commit
b4eb538903
@ -1,8 +1,13 @@
|
||||
"use strict";
|
||||
|
||||
const $ = require("jquery");
|
||||
const socket = require("../socket");
|
||||
const {findChannel} = require("../vue");
|
||||
const {vueApp, findChannel} = require("../vue");
|
||||
|
||||
socket.on("msg:special", function(data) {
|
||||
findChannel(data.chan).channel.data = data.data;
|
||||
|
||||
vueApp.$nextTick(() => {
|
||||
$(`#sidebar .chan[data-id="${data.chan}"]`).trigger("click");
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user