diff --git a/ElementX.xcodeproj/project.pbxproj b/ElementX.xcodeproj/project.pbxproj index 7d3f231e2..c5e248140 100644 --- a/ElementX.xcodeproj/project.pbxproj +++ b/ElementX.xcodeproj/project.pbxproj @@ -8275,7 +8275,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 17.6; KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(DEVELOPMENT_TEAM).$(BASE_BUNDLE_IDENTIFIER)"; MACOSX_DEPLOYMENT_TARGET = 14.6; - MARKETING_VERSION = 25.04.1; + MARKETING_VERSION = 25.04.2; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCTION_APP_NAME = Element; @@ -8351,7 +8351,7 @@ IPHONEOS_DEPLOYMENT_TARGET = 17.6; KEYCHAIN_ACCESS_GROUP_IDENTIFIER = "$(DEVELOPMENT_TEAM).$(BASE_BUNDLE_IDENTIFIER)"; MACOSX_DEPLOYMENT_TARGET = 14.6; - MARKETING_VERSION = 25.04.1; + MARKETING_VERSION = 25.04.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; diff --git a/ElementX/Sources/Application/AppCoordinator.swift b/ElementX/Sources/Application/AppCoordinator.swift index 695a8a834..1274f5e8b 100644 --- a/ElementX/Sources/Application/AppCoordinator.swift +++ b/ElementX/Sources/Application/AppCoordinator.swift @@ -371,13 +371,6 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg /// Perform any required migrations for the app to function correctly. private func performMigrationsIfNecessary(from oldVersion: Version, to newVersion: Version) { - // Migration for the old `hideTimelineMedia` flag. - if let userDefaults = UserDefaults(suiteName: InfoPlistReader.main.appGroupIdentifier), - let hideTimelineMedia = userDefaults.value(forKey: "hideTimelineMedia") as? Bool { - appSettings.timelineMediaVisibility = hideTimelineMedia ? .never : .always - userDefaults.removeObject(forKey: "hideTimelineMedia") - } - guard oldVersion != newVersion else { return } MXLog.info("The app was upgraded from \(oldVersion) to \(newVersion)") @@ -394,6 +387,15 @@ class AppCoordinator: AppCoordinatorProtocol, AuthenticationFlowCoordinatorDeleg Tracing.deleteLogFiles() MXLog.info("Migrating to v1.6.7, log files have been wiped") } + + if oldVersion < Version(25, 4, 2) { + MXLog.info("Migrating to v25.04.2, checking if hideTimelineMedia flag can be migrated to timelineMediaVisibility") + // Migration for the old `hideTimelineMedia` flag. + if let userDefaults = UserDefaults(suiteName: InfoPlistReader.main.appGroupIdentifier), + let hideTimelineMedia = userDefaults.value(forKey: "hideTimelineMedia") as? Bool { + appSettings.timelineMediaVisibility = hideTimelineMedia ? .never : .always + } + } } /// Clears the keychain, app support directory etc ready for a fresh use. diff --git a/project.yml b/project.yml index 2bb577aa4..62659d8b3 100644 --- a/project.yml +++ b/project.yml @@ -40,7 +40,7 @@ settings: ENABLE_BITCODE: false APP_NAME: ElementX KEYCHAIN_ACCESS_GROUP_IDENTIFIER: "$(DEVELOPMENT_TEAM).$(BASE_BUNDLE_IDENTIFIER)" - MARKETING_VERSION: 25.04.1 + MARKETING_VERSION: 25.04.2 CURRENT_PROJECT_VERSION: 1 SUPPORTS_MACCATALYST: false