everything changed
This commit is contained in:
@@ -28,7 +28,8 @@ struct SwitchableView: View {
|
||||
let daysBack: Int
|
||||
|
||||
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
|
||||
|
||||
@AppStorage(UserDefaultsStore.Keys.moodTint.rawValue, store: GroupUserDefaults.groupDefaults) private var moodTint: MoodTints = .Default
|
||||
|
||||
init(daysBack: Int, viewType: Binding<MainSwitchableViewType>, headerTypeChanged: @escaping ((MainSwitchableViewType) -> Void)) {
|
||||
self.daysBack = daysBack
|
||||
self.headerTypeChanged = headerTypeChanged
|
||||
@@ -40,7 +41,7 @@ struct SwitchableView: View {
|
||||
ZStack {
|
||||
switch viewType {
|
||||
case .total:
|
||||
HeaderStatsView(fakeData: false, backDays: daysBack)
|
||||
HeaderStatsView(fakeData: false, backDays: daysBack, moodTint: moodTint)
|
||||
.padding([.leading, .trailing], -15)
|
||||
.padding([.top, .bottom], 8)
|
||||
.allowsHitTesting(false)
|
||||
@@ -75,7 +76,7 @@ struct SwitchableView: View {
|
||||
.padding(.top, -12)
|
||||
}
|
||||
.background(
|
||||
Color(theme.currentTheme.secondaryBGColor)
|
||||
theme.currentTheme.secondaryBGColor
|
||||
)
|
||||
.contentShape(Rectangle())
|
||||
.cornerRadius(10, corners: [.topLeft, .topRight, .bottomLeft, .bottomRight])
|
||||
|
||||
Reference in New Issue
Block a user