This repository was archived by the owner on Feb 23, 2026. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +36
-23
lines changed
Expand file tree Collapse file tree 4 files changed +36
-23
lines changed Original file line number Diff line number Diff line change 474474 "$(inherited)",
475475 "@executable_path/Frameworks",
476476 );
477- MARKETING_VERSION = 0.9.8 ;
477+ MARKETING_VERSION = 0.9.9 ;
478478 PRODUCT_BUNDLE_IDENTIFIER = jp.mknn.harmonie;
479479 PRODUCT_NAME = "$(TARGET_NAME)";
480480 SWIFT_EMIT_LOC_STRINGS = YES;
510510 "$(inherited)",
511511 "@executable_path/Frameworks",
512512 );
513- MARKETING_VERSION = 0.9.8 ;
513+ MARKETING_VERSION = 0.9.9 ;
514514 PRODUCT_BUNDLE_IDENTIFIER = jp.mknn.harmonie;
515515 PRODUCT_NAME = "$(TARGET_NAME)";
516516 SWIFT_EMIT_LOC_STRINGS = YES;
Original file line number Diff line number Diff line change 13231323 }
13241324 }
13251325 },
1326+ "Try again later" : {
1327+ "localizations" : {
1328+ "ja" : {
1329+ "stringUnit" : {
1330+ "state" : "translated",
1331+ "value" : "もう一度お試しください"
1332+ }
1333+ }
1334+ }
1335+ },
13261336 "Two-step verification" : {
13271337 "localizations" : {
13281338 "ja" : {
Original file line number Diff line number Diff line change @@ -36,25 +36,28 @@ extension ErrorAlertModifier: ViewModifier {
3636 func body( content: Content ) -> some View {
3737 @Bindable var appVM = appVM
3838 content
39- . alert (
40- isPresented: isThrownError ( \. vrckError) ,
41- error: appVM. vrckError
42- ) { _ in
43- Button ( " OK " ) {
44- action ( )
45- }
46- } message: { error in
47- Text ( error. failureReason ?? " Try again later. " )
48- }
49- . alert (
50- isPresented: isThrownError ( \. applicationError) ,
51- error: appVM. applicationError
52- ) { _ in
53- Button ( " OK " ) {
54- action ( )
55- }
56- } message: { error in
57- Text ( error. failureReason ?? " Try again later. " )
58- }
39+ . errorAlert ( isThrownError ( \. vrckError) , appVM. vrckError, action)
40+ . errorAlert ( isThrownError ( \. applicationError) , appVM. applicationError, action)
41+ }
42+ }
43+
44+ private extension View {
45+ func errorAlert< E> (
46+ _ isPresented: Binding < Bool > ,
47+ _ error: E ? ,
48+ _ action: @escaping ( ) -> Void
49+ ) -> some View where E: LocalizedError {
50+ alert (
51+ isPresented: isPresented,
52+ error: error
53+ ) { _ in
54+ Button ( " OK " , action: action)
55+ } message: { error in
56+ errorText ( error)
57+ }
58+ }
59+
60+ private func errorText< E> ( _ error: E ) -> Text where E: LocalizedError {
61+ Text ( verbatim: error. failureReason ?? String ( localized: " Try again later " ) )
5962 }
6063}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ extension PreviewData {
2626 instanceId ( casino) : Instance ( world: casino, userCount: 25 ) ,
2727 instanceId ( fuji) : Instance ( world: fuji, userCount: 25 ) ,
2828 instanceId ( chinatown) : Instance ( world: chinatown, userCount: 25 ) ,
29- instanceId ( nightCity) : Instance ( world: nightCity, userCount: 25 ) ,
29+ instanceId ( nightCity) : Instance ( world: nightCity, userCount: 25 )
3030 ]
3131}
3232
You can’t perform that action at this time.
0 commit comments