Skip to content

Commit

Permalink
Merge pull request #1050 from bannzai/fix/view/widget
Browse files Browse the repository at this point in the history
Fix circular widget
  • Loading branch information
bannzai committed Nov 21, 2023
2 parents 05f6565 + 7b716e1 commit 2a418d5
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions ios/Widget/AccessoryCircularWidget.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@ struct AccessoryCircularWidget: WidgetView {

var body: some View {
if #available(iOSApplicationExtension 16.0, *) {
switch entry.status {
case let .pill(todayPillNumber, alreadyTaken):
VStack(spacing: 4) {
Image("pilll-widget-icon")
Group {
switch entry.status {
case let .pill(todayPillNumber, alreadyTaken):
VStack(spacing: 4) {
Image("pilll-widget-icon")

if let todayPillNumber {
if alreadyTaken {
Image("check-icon-on")
.resizable()
.frame(width: 18, height: 18)
} else {
Text(displayTodayPillNumber(todayPillNumber: todayPillNumber, appearanceMode: entry.settingPillSheetAppearanceMode))
.bold()
if let todayPillNumber {
if alreadyTaken {
Image("check-icon-on")
.resizable()
.frame(width: 18, height: 18)
} else {
Text(displayTodayPillNumber(todayPillNumber: todayPillNumber, appearanceMode: entry.settingPillSheetAppearanceMode))
.bold()
}
}
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.black)
case .userIsNotPremiumOrTrial:
VStack(spacing: 4) {
Image("pilll-widget-icon")
case .userIsNotPremiumOrTrial:
VStack(spacing: 4) {
Image("pilll-widget-icon")

Image(systemName: "xmark")
.font(.system(size: 13))
.bold()
Image(systemName: "xmark")
.font(.system(size: 13))
.bold()
}
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.black)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color.black, in: Circle())
}
}
}
}

0 comments on commit 2a418d5

Please sign in to comment.