Skip to content

Commit

Permalink
Fix bug with multivalue best PB ties
Browse files Browse the repository at this point in the history
  • Loading branch information
dmint789 committed Jan 9, 2023
1 parent 9ef69b3 commit fd107d9
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ android {
applicationId "com.stat_tracker"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 16
versionCode 17
versionName "0.5.2"
buildConfigField "boolean", "IS_NEW_ARCHITECTURE_ENABLED", isNewArchitectureEnabled().toString()

Expand Down
2 changes: 1 addition & 1 deletion android/app/src/main/assets/index.android.bundle

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions app/components/Entry.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,24 @@ const Entry: React.FC<{
statType?.trackPBs &&
statType.pbs.allTime.entryId.best === entry.id &&
statType.pbs.allTime.result.best === value
)
) {
pbValueShown.val = true;
return styles.PBStyle;
else if (
} else if (
statType?.trackYearPBs &&
statType.pbs.year.entryId.best === entry.id &&
statType.pbs.year.result.best === value
)
) {
pbValueShown.val = true;
return styles.yearPBStyle;
else if (
} else if (
statType?.trackMonthPBs &&
statType.pbs.month.entryId.best === entry.id &&
statType.pbs.month.result.best === value
)
) {
pbValueShown.val = true;
return styles.monthPBStyle;
else return {};
} else return {};
};

const getMultiStatTextElement = (stat: IStat, statType: IStatType, key: 'best' | 'avg' | 'sum') => {
Expand Down
4 changes: 2 additions & 2 deletions ios/Stat_Tracker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Stat_Tracker/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
Expand All @@ -511,7 +511,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = 16;
CURRENT_PROJECT_VERSION = 17;
INFOPLIST_FILE = Stat_Tracker/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down
2 changes: 1 addition & 1 deletion ios/Stat_Tracker/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>16</string>
<string>17</string>
<key>LSRequiresIPhoneOS</key>
<true />
<key>NSAppTransportSecurity</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/Stat_TrackerTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>16</string>
<string>17</string>
</dict>
</plist>

0 comments on commit fd107d9

Please sign in to comment.