mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: handle Notification requireInteraction option (#36501)
Co-authored-by: Jeremy Spiegel <jeremy.spiegel@frontapp.com> Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Jeremy Spiegel <jeremy.spiegel@frontapp.com>
This commit is contained in:
@@ -35,6 +35,9 @@ void OnWebNotificationAllowed(base::WeakPtr<Notification> notification,
|
||||
options.icon = icon;
|
||||
options.silent = audio_muted ? true : data.silent;
|
||||
options.has_reply = false;
|
||||
if (data.require_interaction)
|
||||
options.timeout_type = u"never";
|
||||
|
||||
notification->Show(options);
|
||||
} else {
|
||||
notification->Destroy();
|
||||
|
||||
Reference in New Issue
Block a user