forked from Blendman974/faceclaw
Merge wake-only notification backdrop correction
This commit is contained in:
commit
a263a055d7
6 files changed
+75
-20
No files matched your search
@@ -492,7 +492,7 @@ class Shell {
|
||||
// App-posted notifications that are open or queued, by key.
|
||||
private readonly appNotifications = new Map<string, AppNotification>();
|
||||
private readonly notificationModals = new NotificationModalQueue<NotificationPopup>({
|
||||
open: (notificationKey) => this.pushNotificationModal(notificationKey),
|
||||
open: (notificationKey, hideBackground) => this.pushNotificationModal(notificationKey, hideBackground),
|
||||
isAvailable: (notificationKey) => {
|
||||
if (this.appNotifications.has(notificationKey)) return true;
|
||||
const notification = readActiveNotifications(ALL_NOTIFICATIONS).find((item) => item.key === notificationKey);
|
||||
@@ -944,7 +944,7 @@ class Shell {
|
||||
this.openNotificationModal(notification.key, wokeScreen);
|
||||
}
|
||||
|
||||
private pushNotificationModal(notificationKey: string): NotificationPopup {
|
||||
private pushNotificationModal(notificationKey: string, hideBackground: boolean): NotificationPopup {
|
||||
const appNotification = this.appNotifications.get(notificationKey);
|
||||
const close = () => this.closeNotificationModal(popup, notificationKey);
|
||||
const content = appNotification
|
||||
@@ -969,6 +969,7 @@ class Shell {
|
||||
appNotification ? appNotification.createLayer(close) : content!,
|
||||
this.config.actions,
|
||||
{
|
||||
hideBackground,
|
||||
removed: () => {
|
||||
timeout.stop();
|
||||
this.appNotifications.delete(notificationKey);
|
||||
|
||||
Reference in new issue
Block a user