mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
bump to 25.04.2 and improved migration code
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
+1
-1
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user