fix: issue #146 - make trial always says days on every trial banner in the app

Automated fix by Tony CI v3.
Refs #146

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
treyt
2026-02-27 13:00:53 -06:00
parent d41ba29939
commit b1713337f6
3 changed files with 8 additions and 8 deletions

View File

@@ -41,7 +41,7 @@ struct SettingsTabView: View {
UpgradeBannerView(
showWhyUpgrade: $showWhyUpgrade,
showSubscriptionStore: $showSubscriptionStore,
trialExpirationDate: iapManager.trialExpirationDate
daysRemaining: iapManager.daysLeftInTrial
)
.padding(.horizontal, 16)
.padding(.top, 12)
@@ -86,7 +86,7 @@ struct SettingsTabView: View {
struct UpgradeBannerView: View {
@Binding var showWhyUpgrade: Bool
@Binding var showSubscriptionStore: Bool
let trialExpirationDate: Date?
let daysRemaining: Int
@Environment(\.colorScheme) private var colorScheme
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
@@ -101,8 +101,8 @@ struct UpgradeBannerView: View {
.font(.subheadline.weight(.medium))
.foregroundColor(.orange)
if let expirationDate = trialExpirationDate, expirationDate > Date() {
Text("\(Text("Trial expires in ").font(.subheadline.weight(.medium)).foregroundColor(textColor.opacity(0.8)))\(Text(expirationDate, style: .relative).font(.subheadline.weight(.bold)).foregroundColor(.orange))")
if daysRemaining > 0 {
Text("\(Text("Trial expires in ").font(.subheadline.weight(.medium)).foregroundColor(textColor.opacity(0.8)))\(Text("\(daysRemaining) days").font(.subheadline.weight(.bold)).foregroundColor(.orange))")
} else {
Text("Trial expired")
.font(.subheadline.weight(.medium))