Fix sidebar not opening when lounge is open in a background tab

This commit is contained in:
Pavel Djundik 2019-12-01 20:20:37 +02:00
parent 674d9cfbd8
commit cf0a4999e9
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");
} }