diff options
| author | tamaina <tamaina@hotmail.co.jp> | 2021-02-17 21:36:56 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-17 21:36:56 +0900 |
| commit | 126826eb5a05fbb7ec5044269e6a25eb04154637 (patch) | |
| tree | f469a26b7cfa70564e9452e6ab582851dbb85b8a /src/client/init.ts | |
| parent | Fix #7212 (#7215) (diff) | |
| download | misskey-126826eb5a05fbb7ec5044269e6a25eb04154637.tar.gz misskey-126826eb5a05fbb7ec5044269e6a25eb04154637.tar.bz2 misskey-126826eb5a05fbb7ec5044269e6a25eb04154637.zip | |
Implement in-unison reload (#7196)
* Resolve #6804
Implement unison reload
* :v:
* fix
* Update share.vue
fix
Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
Diffstat (limited to 'src/client/init.ts')
| -rw-r--r-- | src/client/init.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/init.ts b/src/client/init.ts index 146c54fa62..c60b25359b 100644 --- a/src/client/init.ts +++ b/src/client/init.ts @@ -59,6 +59,7 @@ import { search } from '@/scripts/search'; import { isMobile } from '@/scripts/is-mobile'; import { getThemes } from '@/theme-store'; import { initializeSw } from '@/scripts/initialize-sw'; +import { reloadChannel } from '@/scripts/unison-reload'; console.info(`Misskey v${version}`); @@ -106,6 +107,9 @@ if (defaultStore.state.reportError && !_DEV_) { // タッチデバイスでCSSの:hoverを機能させる document.addEventListener('touchend', () => {}, { passive: true }); +// 一斉リロード +reloadChannel.addEventListener('message', () => location.reload()); + //#region SEE: https://css-tricks.com/the-trick-to-viewport-units-on-mobile/ // TODO: いつの日にか消したい const vh = window.innerHeight * 0.01; |