Skip to content

Commit

Permalink
mobile inactive hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
voynow committed Feb 2, 2025
1 parent b271abd commit 4d0c419
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions mobile/mobile.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.0;
MARKETING_VERSION = 2.2.1;
PRODUCT_BUNDLE_IDENTIFIER = voynow.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down Expand Up @@ -343,7 +343,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.2.0;
MARKETING_VERSION = 2.2.1;
PRODUCT_BUNDLE_IDENTIFIER = voynow.mobile;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
10 changes: 7 additions & 3 deletions mobile/mobile/TrainingWeek.swift
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ struct WeeklyProgressContent: View {
let completedMileage: Double
let totalMileage: Double

private var progressPercentage: Int {
guard totalMileage > 0 else { return 0 }
return Int((completedMileage / totalMileage) * 100)
}

private var weekRange: String {
var calendar = Calendar.current
calendar.firstWeekday = 2 // 2 represents Monday
Expand Down Expand Up @@ -118,8 +123,7 @@ struct WeeklyProgressContent: View {
}

HStack {
let progress = completedMileage / totalMileage
Text("\(Int(progress * 100))%")
Text("\(progressPercentage)%")
.font(.system(size: 40, weight: .bold))
.foregroundColor(ColorTheme.white)

Expand All @@ -136,7 +140,7 @@ struct WeeklyProgressContent: View {
}
}

ProgressBar(progress: completedMileage / totalMileage)
ProgressBar(progress: totalMileage > 0 ? completedMileage / totalMileage : 0)
.frame(height: 8)
.animation(.easeOut(duration: 0.8), value: completedMileage)
}
Expand Down

0 comments on commit 4d0c419

Please sign in to comment.