Skip to content

Commit

Permalink
chore: remove old upgrading code
Browse files Browse the repository at this point in the history
  • Loading branch information
icidasset committed Feb 11, 2024
1 parent 835f7a1 commit 681f189
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 33 deletions.
1 change: 0 additions & 1 deletion src/Applications/UI.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions src/Applications/UI/Types.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -70,7 +69,6 @@ type alias Model =
, isOnline : Bool
, isTauri : Bool
, isTouchDevice : Bool
, isUpgrading : Bool
, lastFm : LastFm.Model
, navKey : Nav.Key
, page : Page
Expand Down
14 changes: 0 additions & 14 deletions src/Applications/UI/User/State/Import.elm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 0 additions & 16 deletions src/Javascript/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ async function initialise(reg) {
isInstallingServiceWorker: !!reg.installing,
isOnline: navigator.onLine,
isTauri: isNativeWrapper,
upgrade: viableForUpgrade(),
version,
viewport: {
height: window.innerHeight,
Expand Down Expand Up @@ -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
}

0 comments on commit 681f189

Please sign in to comment.