Skip to content

Commit d479f9c

Browse files
committed
fixed crash of old chattier scrambles
1 parent 1a46983 commit d479f9c

File tree

2 files changed

+21
-18
lines changed

2 files changed

+21
-18
lines changed

CubeTime.xcodeproj/project.pbxproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@
663663
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
664664
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
665665
CODE_SIGN_STYLE = Automatic;
666-
CURRENT_PROJECT_VERSION = 1;
666+
CURRENT_PROJECT_VERSION = 4;
667667
DEVELOPMENT_ASSET_PATHS = "\"CubeTime/Preview Content\"";
668668
DEVELOPMENT_TEAM = 52VS5QG4YD;
669669
ENABLE_PREVIEWS = YES;
@@ -697,7 +697,7 @@
697697
"$(PROJECT_DIR)/CubeTime/3rdparty/j2objc/lib",
698698
);
699699
LLVM_LTO = YES_THIN;
700-
MARKETING_VERSION = 1.1.0;
700+
MARKETING_VERSION = 1.0.1;
701701
OTHER_LDFLAGS = (
702702
"-ltnoodle",
703703
"-ljre_core",
@@ -720,7 +720,7 @@
720720
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
721721
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
722722
CODE_SIGN_STYLE = Automatic;
723-
CURRENT_PROJECT_VERSION = 1;
723+
CURRENT_PROJECT_VERSION = 4;
724724
DEVELOPMENT_ASSET_PATHS = "\"CubeTime/Preview Content\"";
725725
DEVELOPMENT_TEAM = 52VS5QG4YD;
726726
ENABLE_PREVIEWS = YES;
@@ -754,7 +754,7 @@
754754
"$(PROJECT_DIR)/CubeTime/3rdparty/j2objc/lib",
755755
);
756756
LLVM_LTO = YES_THIN;
757-
MARKETING_VERSION = 1.1.0;
757+
MARKETING_VERSION = 1.0.1;
758758
OTHER_LDFLAGS = (
759759
"-ltnoodle",
760760
"-ljre_core",

CubeTime/TimeList/TimeDetail.swift

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -163,31 +163,34 @@ struct TimeDetailViewOnly: View {
163163
Divider()
164164
.padding(.leading)
165165

166-
if puzzle_type.name == "Megaminx" {
167-
Text(scramble.dropLast())
168-
.font(.system(size: (UIScreen.screenWidth-32) / (42.00) * 1.44, weight: .regular, design: .monospaced))
169-
.foregroundColor(colourScheme == .light ? .black : .white)
170-
.padding([.horizontal], 12)
171-
} else {
172-
Text(scramble)
173-
.font(.system(size: 16, weight: .regular, design: .monospaced))
174-
.foregroundColor(colourScheme == .light ? .black : .white)
175-
.padding([.horizontal], 12)
166+
let brokenScramble: Bool = chtscramblesthatdontworkwithtnoodle.contains(puzzle_type.puzzle) && (date < Date(timeIntervalSince1970: TimeInterval(1643760000)))
167+
168+
Group {
169+
if puzzle_type.name == "Megaminx" {
170+
Text(scramble.dropLast())
171+
.font(.system(size: (UIScreen.screenWidth-32) / (42.00) * 1.44, weight: .regular, design: .monospaced))
172+
} else {
173+
Text(scramble)
174+
.font(.system(size: 16, weight: .regular, design: .monospaced))
175+
}
176176
}
177+
.foregroundColor(colourScheme == .light ? .black : .white)
178+
.padding([.horizontal], 12)
179+
.padding(.bottom, brokenScramble ? 12 : 0)
177180

178-
if !chtscramblesthatdontworkwithtnoodle.contains(puzzle_type.puzzle) ||
179-
date > Date(timeIntervalSince1970: TimeInterval(1643278.400)) {
181+
182+
if !(brokenScramble) {
180183
Divider()
181184
.padding(.leading)
182185

183-
184186
AsyncScrambleView(puzzle: puzzle_type.puzzle, scramble: scramble)
185187
.frame(height: puzzle_type.puzzle.getKey() == "sq1" ? UIScreen.screenHeight/3 : nil)
186188
.padding(.horizontal, 32)
187189
.padding(.bottom)
188190
.padding(.top, 12)
189-
190191
}
192+
193+
// if !chtscramblesthatdontworkwithtnoodle.contains(puzzle_type.puzzle) || date > Date(timeIntervalSince1970: TimeInterval(1643278.400))
191194
}
192195
.background(Color(uiColor: colourScheme == .light ? .white : .systemGray6).clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous)))
193196

0 commit comments

Comments
 (0)