leits / MeetingBar

🇺🇦 Your meetings at your fingertips in the macOS menu bar
https://meetingbar.app
Apache License 2.0
4.44k stars 192 forks source link

Bug: Notification warning overlaps with notification setting #484

Closed jaklan closed 1 year ago

jaklan commented 2 years ago

App version 4.0.6

Installation source homebrew

Describe the bug As in the picture, the setting is not clickable due to that:

image

Desktop (please complete the following information):

GrahamWilliams-DMT commented 2 years ago

After some digging around, having absolutely no idea what I was doing, I found:

func checkNotificationSettings() -> (Bool, Bool) {
    var noAlertStyle = false
    var notificationsDisabled = false

    let center = UNUserNotificationCenter.current()
    let group = DispatchGroup()
    group.enter()

    center.getNotificationSettings { notificationSettings in
        noAlertStyle = notificationSettings.alertStyle != UNAlertStyle.alert
        notificationsDisabled = notificationSettings.authorizationStatus == UNAuthorizationStatus.denied
        group.leave()
    }

Seems to be looking specifically for "Alert" style in notifications, not banner. Despite having "Allow Notifications" enabled, I thought this may be enough. Switching to Alerts solves this.

image

jaklan commented 2 years ago

@GrahamWilliams-DMT well, of course it makes sense that when you switch to alerts the warning is gone, but that's not a solution if you want to stay with banners and not really related to the above GUI issue itself.

stenalpjolly commented 2 years ago

Please check this as well

image

leits commented 2 years ago

Sorry, my bad, it's only because of a bug in SwiftUI view. I'll fix it in the next release!

leits commented 1 year ago

Added fix to the next release.