Skip to content

Commit

Permalink
FPU colors and Watch Icons
Browse files Browse the repository at this point in the history
  • Loading branch information
mountrcg committed Aug 8, 2023
1 parent 56089f7 commit 5f1c470
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
4 changes: 2 additions & 2 deletions FreeAPS/Sources/APS/FetchAnnouncementsManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ final class BaseFetchAnnouncementsManager: FetchAnnouncementsManager, Injectable
}
.sink { announcements in
guard let last = announcements.filter({ $0.createdAt > self.announcementsStorage.syncDate() })
.sorted(by: { $0.createdAt < $1.createdAt })
.last
.sorted(by: { $0.createdAt < $1.createdAt })
.last
else { return }

self.announcementsStorage.storeAnnouncements([last], enacted: false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,12 @@ extension DataTable {
if item
.type == .tempTarget
{ Image(systemName: "circle").foregroundColor(Color.basal.opacity(0.8))
}}
}
if item
.type == .fpus
{ Image(systemName: "circle").foregroundColor(.orange)
}
}
Text(dateFormatter.string(from: item.date))
.moveDisabled(true)
Text(item.type.name)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ struct MainChartView: View {
fpuPath
.fill(Color.red)
fpuPath
.stroke(Color.primary, lineWidth: 0.5)
.stroke(Color.orange)

ForEach(fpuDots, id: \.rect.minX) { info -> AnyView in
let position = CGPoint(x: info.rect.midX, y: info.rect.minY - 8)
Expand Down
14 changes: 8 additions & 6 deletions FreeAPSWatch WatchKit Extension/Views/CarbsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ struct CarbsView: View {
// nutrient
carbs
if state.displayFatAndProteinOnWatch {
Spacer()
protein
Spacer()
fat
Spacer()
protein
}
buttonStack
}
Expand Down Expand Up @@ -68,7 +68,7 @@ struct CarbsView: View {
.tint(selection == .carbs ? .blue : .none)
}
Spacer()
Text("🥨")
Text("Carbs")
Spacer()
Text(numberFormatter.string(from: carbAmount as NSNumber)! + " g")
.font(selection == .carbs ? .title : .title3)
Expand Down Expand Up @@ -112,7 +112,8 @@ struct CarbsView: View {
.tint(selection == .protein ? .blue : .none)
}
Spacer()
Text("🍗")
Text("Protein")
.foregroundStyle(.red)
Spacer()
Text(numberFormatter.string(from: proteinAmount as NSNumber)! + " g")
.font(selection == .protein ? .title : .title3)
Expand Down Expand Up @@ -155,11 +156,12 @@ struct CarbsView: View {
.tint(selection == .fat ? .blue : .none)
}
Spacer()
Text("🧀")
Text("Fat")
.foregroundStyle(.orange)
Spacer()
Text(numberFormatter.string(from: fatAmount as NSNumber)! + " g")
.font(selection == .fat ? .title : .title3)
.foregroundColor(.loopYellow)
.foregroundStyle(.orange)
.focusable(selection == .fat)
.digitalCrownRotation(
$fatAmount,
Expand Down

0 comments on commit 5f1c470

Please sign in to comment.