Open list channel on data updates

This commit is contained in:
Pavel Djundik 2019-08-04 14:03:04 +03:00
parent 1f27c4fad4
commit 96efaed07a

View File

@ -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");
});
});