diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2020-01-30 04:37:25 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-30 04:37:25 +0900 |
| commit | f6154dc0af1a0d65819e87240f4385f9573095cb (patch) | |
| tree | 699a5ca07d6727b7f8497d4769f25d6d62f94b5a /src/client/app/common/scripts/check-for-update.ts | |
| parent | Add Event activity-type support (#5785) (diff) | |
| download | misskey-f6154dc0af1a0d65819e87240f4385f9573095cb.tar.gz misskey-f6154dc0af1a0d65819e87240f4385f9573095cb.tar.bz2 misskey-f6154dc0af1a0d65819e87240f4385f9573095cb.zip | |
v12 (#5712)
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com>
Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
Diffstat (limited to 'src/client/app/common/scripts/check-for-update.ts')
| -rw-r--r-- | src/client/app/common/scripts/check-for-update.ts | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/client/app/common/scripts/check-for-update.ts b/src/client/app/common/scripts/check-for-update.ts deleted file mode 100644 index d487915766..0000000000 --- a/src/client/app/common/scripts/check-for-update.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { version as current } from '../../config'; - -export default async function($root: any, force = false, silent = false) { - const meta = await $root.getMeta(force); - const newer = meta.version; - - if (newer != current) { - localStorage.setItem('should-refresh', 'true'); - localStorage.setItem('v', newer); - - // Clear cache (service worker) - try { - if (navigator.serviceWorker.controller) { - navigator.serviceWorker.controller.postMessage('clear'); - } - - const registrations = await navigator.serviceWorker.getRegistrations(); - for (const registration of registrations) { - registration.unregister(); - } - } catch (e) { - console.error(e); - } - - /*if (!silent) { - $root.dialog({ - title: $root.$t('@.update-available-title'), - text: $root.$t('@.update-available', { newer, current }) - }); - }*/ - - return newer; - } else { - return null; - } -} |