mirror of
https://github.com/thelounge/thelounge
synced 2024-11-23 04:23:13 +00:00
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 changed files with 6 additions and 1 deletions
|
@ -1,8 +1,13 @@
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
const $ = require("jquery");
|
||||||
const socket = require("../socket");
|
const socket = require("../socket");
|
||||||
const {findChannel} = require("../vue");
|
const {vueApp, findChannel} = require("../vue");
|
||||||
|
|
||||||
socket.on("msg:special", function(data) {
|
socket.on("msg:special", function(data) {
|
||||||
findChannel(data.chan).channel.data = data.data;
|
findChannel(data.chan).channel.data = data.data;
|
||||||
|
|
||||||
|
vueApp.$nextTick(() => {
|
||||||
|
$(`#sidebar .chan[data-id="${data.chan}"]`).trigger("click");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue