From 53422ffcb296be404c0f3ef7e175bedecca4fb4d Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 15 Feb 2019 05:08:59 +0900 Subject: Improve desktop UX (#4262) * wip * wip * wip * wip * wip * wip * Merge * wip * wip * wip * wip * wip * wip --- src/client/app/init.ts | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src/client/app/init.ts') diff --git a/src/client/app/init.ts b/src/client/app/init.ts index 2f18030f0d..710bef8b65 100644 --- a/src/client/app/init.ts +++ b/src/client/app/init.ts @@ -350,7 +350,7 @@ if (localStorage.getItem('should-refresh') == 'true') { } // MiOSを初期化してコールバックする -export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void, sw = false) => { +export default (callback: (launch: (router: VueRouter) => [Vue, MiOS], os: MiOS) => void, sw = false) => { const os = new MiOS(sw); os.init(() => { @@ -436,11 +436,6 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void, }); //#endregion - // Navigation hook - router.beforeEach((to, from, next) => { - next(os.store.state.navHook && os.store.state.navHook(to) ? false : undefined); - }); - document.addEventListener('visibilitychange', () => { if (!document.hidden) { os.store.commit('clearBehindNotes'); @@ -507,6 +502,6 @@ export default (callback: (launch: (router: VueRouter) => [Vue, MiOS]) => void, return [app, os] as [Vue, MiOS]; }; - callback(launch); + callback(launch, os); }); }; -- cgit v1.2.3-freya