update default widget templates
This commit is contained in:
1 parent
b0842ea4dc
commit
94f1c625be
4 files changed
+4
-3
No files matched your search
@@ -205,7 +205,7 @@ static CGRect layoutViewBounds;
|
|||||||
NSSet *classes = [NSSet setWithObjects: [NSMutableData class], [NSMutableArray class], nil];
|
NSSet *classes = [NSSet setWithObjects: [NSMutableData class], [NSMutableArray class], nil];
|
||||||
profilesEncoded = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:fileData error:&error];
|
profilesEncoded = [NSKeyedUnarchiver unarchivedObjectOfClasses:classes fromData:fileData error:&error];
|
||||||
[self importEncodedProfiles:profilesEncoded];
|
[self importEncodedProfiles:profilesEncoded];
|
||||||
[self setProfileToSelected:0];
|
[self setProfileToSelected: GenericUtils.isIPhone ? 1 : 2];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,8 @@ static CGRect layoutViewBounds;
|
|||||||
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
|
||||||
|
|
||||||
// NSString* persistedKey = @"widgetProfileUpdated-20251015";
|
// NSString* persistedKey = @"widgetProfileUpdated-20251015";
|
||||||
NSString* persistedKey = @"widgetProfileUpdated-20260322";
|
// NSString* persistedKey = @"widgetProfileUpdated-20260322";
|
||||||
|
NSString* persistedKey = @"widgetProfileUpdated-20260408";
|
||||||
BOOL needImportDefaultTemplates = [defaults objectForKey:persistedKey] == nil;
|
BOOL needImportDefaultTemplates = [defaults objectForKey:persistedKey] == nil;
|
||||||
|
|
||||||
if(profiles.count == 0 || needImportDefaultTemplates){
|
if(profiles.count == 0 || needImportDefaultTemplates){
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
+1
-1
@@ -1179,7 +1179,7 @@ final class LayoutOnScreenControlsViewController: UIViewController, OnScreenWidg
|
|||||||
let currentProfile = profilesManager.getSelectedProfile()
|
let currentProfile = profilesManager.getSelectedProfile()
|
||||||
// currentProfile.name = "RPG游戏示例 / RPG example (ZZZ in Genshin style)"
|
// currentProfile.name = "RPG游戏示例 / RPG example (ZZZ in Genshin style)"
|
||||||
currentProfile.name = "Default"
|
currentProfile.name = "Default"
|
||||||
//currentProfile.name = "Default";
|
// currentProfile.name = "Default";
|
||||||
// profilesManager.replace(targetProfile as! OSCProfile, with: currentProfile)
|
// profilesManager.replace(targetProfile as! OSCProfile, with: currentProfile)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user