Keep scroll to bottom and check 'more' button previews when toggling sidebars

This commit is contained in:
Pavel Djundik 2018-09-01 19:11:03 +03:00
parent f45f9a83ee
commit 5c69fe104d
3 changed files with 1 additions and 9 deletions

View File

@ -25,7 +25,7 @@ window.vueMounted = () => {
function storeSidebarVisibility(name, state) { function storeSidebarVisibility(name, state) {
storage.set(name, state); storage.set(name, state);
utils.togglePreviewMoreButtonsIfNeeded(); vueApp.$emit("resize");
} }
// If sidebar overlay is visible and it is clicked, close the sidebar // If sidebar overlay is visible and it is clicked, close the sidebar

View File

@ -1,7 +1,6 @@
"use strict"; "use strict";
const $ = require("jquery"); const $ = require("jquery");
const debounce = require("lodash/debounce");
const Mousetrap = require("mousetrap"); const Mousetrap = require("mousetrap");
const templates = require("../views"); const templates = require("../views");

View File

@ -21,7 +21,6 @@ module.exports = {
updateTitle, updateTitle,
togglePasswordField, togglePasswordField,
requestIdleCallback, requestIdleCallback,
togglePreviewMoreButtonsIfNeeded,
}; };
function findCurrentNetworkChan(name) { function findCurrentNetworkChan(name) {
@ -161,9 +160,3 @@ function requestIdleCallback(callback, timeout) {
callback(); callback();
} }
} }
// Force handling preview display
function togglePreviewMoreButtonsIfNeeded() {
$("#chat .chan.active .toggle-content.toggle-type-link.show")
.trigger("showMoreIfNeeded");
}