Working stuff with revamped UI

This commit is contained in:
Hariharan Mudaliar 2025-12-09 17:03:17 +05:30
commit 5a8c592157
No known key found for this signature in database
GPG key ID: D04F1C2B9194DDFC
11 changed files with 646 additions and 279 deletions

View file

@ -21,6 +21,7 @@ struct DynamicIslandHeader: View {
@State private var showColorPickerPopover = false
@State private var showTimerPopover = false
@Default(.enableTimerFeature) var enableTimerFeature
@Default(.timerDisplayMode) var timerDisplayMode
var body: some View {
HStack(spacing: 0) {
@ -144,7 +145,7 @@ struct DynamicIslandHeader: View {
}
}
if Defaults[.enableTimerFeature] {
if Defaults[.enableTimerFeature] && timerDisplayMode == .popover {
Button(action: {
withAnimation(.smooth) {
showTimerPopover.toggle()
@ -252,6 +253,12 @@ struct DynamicIslandHeader: View {
vm.isTimerPopoverActive = false
}
}
.onChange(of: timerDisplayMode) { _, mode in
if mode == .tab {
showTimerPopover = false
vm.isTimerPopoverActive = false
}
}
}
}