File tree Expand file tree Collapse file tree 3 files changed +13
-13
lines changed
Expand file tree Collapse file tree 3 files changed +13
-13
lines changed Original file line number Diff line number Diff line change 358358 CODE_SIGN_ENTITLEMENTS = bearTracks/bearTracks.entitlements;
359359 "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
360360 CODE_SIGN_STYLE = Automatic;
361- CURRENT_PROJECT_VERSION = 14 ;
361+ CURRENT_PROJECT_VERSION = 19 ;
362362 DEVELOPMENT_ASSET_PATHS = "\"bearTracks/Preview Content\"";
363363 DEVELOPMENT_TEAM = D6MFYYVHA8;
364364 ENABLE_PREVIEWS = YES;
378378 "$(inherited)",
379379 "@executable_path/Frameworks",
380380 );
381- MARKETING_VERSION = 5.0.5 ;
381+ MARKETING_VERSION = 5.0.501 ;
382382 PRODUCT_BUNDLE_IDENTIFIER = com.jayagra.beartracks;
383383 PRODUCT_NAME = "$(TARGET_NAME)";
384384 SDKROOT = xros;
402402 CODE_SIGN_ENTITLEMENTS = bearTracks/bearTracks.entitlements;
403403 "CODE_SIGN_IDENTITY[sdk=macosx*]" = "Apple Development";
404404 CODE_SIGN_STYLE = Automatic;
405- CURRENT_PROJECT_VERSION = 14 ;
405+ CURRENT_PROJECT_VERSION = 19 ;
406406 DEVELOPMENT_ASSET_PATHS = "\"bearTracks/Preview Content\"";
407407 DEVELOPMENT_TEAM = D6MFYYVHA8;
408408 ENABLE_PREVIEWS = YES;
422422 "$(inherited)",
423423 "@executable_path/Frameworks",
424424 );
425- MARKETING_VERSION = 5.0.5 ;
425+ MARKETING_VERSION = 5.0.501 ;
426426 PRODUCT_BUNDLE_IDENTIFIER = com.jayagra.beartracks;
427427 PRODUCT_NAME = "$(TARGET_NAME)";
428428 SDKROOT = xros;
Original file line number Diff line number Diff line change @@ -20,12 +20,4 @@ class SettingsManager {
2020 ]
2121 UserDefaults . standard. register ( defaults: defaults)
2222 }
23-
24- func saveSetting( value: String , forKey key: String ) {
25- UserDefaults . standard. set ( value, forKey: key)
26- }
27-
28- func getSetting( forKey key: String ) -> String ? {
29- return UserDefaults . standard. string ( forKey: key)
30- }
3123}
Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ struct TeamView: View {
5757 . frame ( maxWidth: . infinity)
5858 VStack {
5959 Text (
60- String ( format: " %.1f " , ( dataItems. teamData. first? . rps ?? 0 ) / ( dataItems. teamData. first? . count ?? 1 ) )
60+ String ( format: " %.1f " , divideNotZero ( num : dataItems. teamData. first? . rps ?? 0 , denom : dataItems. teamData. first? . count ?? 1 ) )
6161 )
6262 . font ( . title)
6363 Text ( " RPs / match " )
@@ -120,6 +120,14 @@ struct TeamView: View {
120120 dataItems. reload ( )
121121 }
122122 }
123+
124+ private func divideNotZero( num: Int , denom: Int ) -> Double {
125+ if denom == 0 {
126+ return 0.0
127+ } else {
128+ return Double ( num) / Double( denom)
129+ }
130+ }
123131}
124132
125133#Preview {
You can’t perform that action at this time.
0 commit comments