forked from Blendman974/faceclaw
[verified] fix: hide notification background only on screen wake
This commit is contained in:
1 parent
22df4d76d9
commit
9ddc864b0d
6 files changed
+75
-20
No files matched your search
@@ -482,7 +482,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);
|
||||
@@ -926,7 +926,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
|
||||
@@ -951,6 +951,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