Merge pull request #3546 from thelounge/xpaw/fix-sidebar-closing

Fix sidebar not opening when lounge is open in a background tab
This commit is contained in:
Pavel Djundik 2019-12-03 10:23:59 +02:00 committed by GitHub
commit 4ef5c66fd6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -70,7 +70,7 @@ export default {
return tommorow - today; return tommorow - today;
}, },
prepareOpenStates() { prepareOpenStates() {
const viewportWidth = window.outerWidth; const viewportWidth = window.innerWidth;
let isUserlistOpen = storage.get("thelounge.state.userlist"); let isUserlistOpen = storage.get("thelounge.state.userlist");
if (viewportWidth > constants.mobileViewportPixels) { if (viewportWidth > constants.mobileViewportPixels) {

View File

@ -69,7 +69,7 @@ const vueApp = new Vue({
store.watch( store.watch(
(state) => state.sidebarOpen, (state) => state.sidebarOpen,
(sidebarOpen) => { (sidebarOpen) => {
if (window.outerWidth > constants.mobileViewportPixels) { if (window.innerWidth > constants.mobileViewportPixels) {
storage.set("thelounge.state.sidebar", sidebarOpen); storage.set("thelounge.state.sidebar", sidebarOpen);
vueApp.$emit("resize"); vueApp.$emit("resize");
} }