mirror of
https://github.com/FBukovina/Atoll.git
synced 2026-10-27 15:14:33 +00:00
Added condition to handle overflow by eliminating the indicator in the open notch
This commit is contained in:
parent
4d12c3e18c
commit
5b2f6429f4
1 changed files with 15 additions and 2 deletions
|
|
@ -193,12 +193,15 @@ struct DynamicIslandHeader: View {
|
|||
}
|
||||
|
||||
// Screen Recording Indicator
|
||||
if Defaults[.enableScreenRecordingDetection] && Defaults[.showRecordingIndicator] {
|
||||
if Defaults[.enableScreenRecordingDetection] && Defaults[.showRecordingIndicator] && !shouldSuppressStatusIndicators {
|
||||
RecordingIndicator()
|
||||
.frame(width: 30, height: 30) // Same size as other header elements
|
||||
}
|
||||
|
||||
if Defaults[.enableDoNotDisturbDetection] && Defaults[.showDoNotDisturbIndicator] && doNotDisturbManager.isDoNotDisturbActive {
|
||||
if Defaults[.enableDoNotDisturbDetection]
|
||||
&& Defaults[.showDoNotDisturbIndicator]
|
||||
&& doNotDisturbManager.isDoNotDisturbActive
|
||||
&& !shouldSuppressStatusIndicators {
|
||||
FocusIndicator()
|
||||
.frame(width: 30, height: 30)
|
||||
.transition(.opacity)
|
||||
|
|
@ -253,6 +256,16 @@ struct DynamicIslandHeader: View {
|
|||
}
|
||||
}
|
||||
|
||||
private extension DynamicIslandHeader {
|
||||
var shouldSuppressStatusIndicators: Bool {
|
||||
Defaults[.settingsIconInNotch]
|
||||
&& Defaults[.enableClipboardManager]
|
||||
&& Defaults[.showClipboardIcon]
|
||||
&& Defaults[.enableColorPickerFeature]
|
||||
&& Defaults[.enableTimerFeature]
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
DynamicIslandHeader()
|
||||
.environmentObject(DynamicIslandViewModel())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue