From 681f189a1a8b65b392fb3432c4388e70fb9ebfd4 Mon Sep 17 00:00:00 2001 From: Steven Vandevelde Date: Sun, 11 Feb 2024 13:42:05 +0100 Subject: [PATCH] chore: remove old upgrading code --- src/Applications/UI.elm | 1 - src/Applications/UI/Types.elm | 2 -- src/Applications/UI/User/State/Import.elm | 14 -------------- src/Javascript/index.ts | 16 ---------------- 4 files changed, 33 deletions(-) diff --git a/src/Applications/UI.elm b/src/Applications/UI.elm index 3d0b1e1d..a839f5a2 100644 --- a/src/Applications/UI.elm +++ b/src/Applications/UI.elm @@ -103,7 +103,6 @@ init flags url key = , isOnline = flags.isOnline , isTauri = flags.isTauri , isTouchDevice = False - , isUpgrading = flags.upgrade , lastFm = LastFm.initialModel , navKey = key , page = page diff --git a/src/Applications/UI/Types.elm b/src/Applications/UI/Types.elm index 088a570a..2bc1362f 100644 --- a/src/Applications/UI/Types.elm +++ b/src/Applications/UI/Types.elm @@ -46,7 +46,6 @@ type alias Flags = , isInstallingServiceWorker : Bool -- ie. Installing SW for the first time , isOnline : Bool , isTauri : Bool - , upgrade : Bool , version : String , viewport : Viewport } @@ -70,7 +69,6 @@ type alias Model = , isOnline : Bool , isTauri : Bool , isTouchDevice : Bool - , isUpgrading : Bool , lastFm : LastFm.Model , navKey : Nav.Key , page : Page diff --git a/src/Applications/UI/User/State/Import.elm b/src/Applications/UI/User/State/Import.elm index f324d977..1bb3a35a 100644 --- a/src/Applications/UI/User/State/Import.elm +++ b/src/Applications/UI/User/State/Import.elm @@ -93,20 +93,6 @@ loadHypaethralUserData json model = _ -> Return.singleton m ) - |> andThen - (\m -> - if m.isUpgrading then - """ - Thank you for using Diffuse V1! - If you want to import your old data, - please go to the [import page](#/settings/data). - """ - |> Notifications.stickySuccess - |> Common.showNotificationWithModel m - - else - Return.singleton m - ) |> andThen Sources.addSourcesFromUrl diff --git a/src/Javascript/index.ts b/src/Javascript/index.ts index 03757d67..cc45f081 100644 --- a/src/Javascript/index.ts +++ b/src/Javascript/index.ts @@ -119,7 +119,6 @@ async function initialise(reg) { isInstallingServiceWorker: !!reg.installing, isOnline: navigator.onLine, isTauri: isNativeWrapper, - upgrade: viableForUpgrade(), version, viewport: { height: window.innerHeight, @@ -969,18 +968,3 @@ window.addEventListener("touchstart", function onFirstTouch() { app.ports.indicateTouchDevice.send(null) window.removeEventListener("touchstart", onFirstTouch, false) }, false) - - - -// Upgrade -// ------- - -function viableForUpgrade() { - // Was the user using an old version of the app? - // V1 - const viable_v1 = !!localStorage.getItem("additional-userdata") - if (viable_v1) localStorage.removeItem("additional-userdata") - - // The end - return viable_v1 -} -- 2.51.2