Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2021-01-29 18:18:53 +01:00
parent 3fb249c88a
commit 5de75a47f5
1 changed files with 6 additions and 4 deletions

View File

@ -1299,10 +1299,12 @@ module.exports = (_ => {
notification.close();
};
let timeout = typeof data.config.timeout == "number" && !disableInteractions ? data.config.timeout : 3000;
let closeTimeout = BDFDB.TimeUtils.timeout(_ => {
notification.close();
}, timeout > 0 ? timeout : 600000);
if (!data.config.requireInteraction) {
let timeout = typeof data.config.timeout == "number" && !disableInteractions ? data.config.timeout : 5000;
let closeTimeout = BDFDB.TimeUtils.timeout(_ => {
notification.close();
}, timeout > 0 ? timeout : 600000);
}
notification.onclose = _ => {
BDFDB.TimeUtils.clear(closeTimeout);