mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-20 15:06:15 -04:00
Make "Connecting..." toast persistent until connection is established
This commit is contained in:
parent
4e00e5b358
commit
684fe7142d
4 changed files with 28 additions and 14 deletions
|
@ -2044,9 +2044,12 @@ class Toast extends Dialog {
|
|||
|
||||
_onNotify(message) {
|
||||
if (this.hideTimeout) clearTimeout(this.hideTimeout);
|
||||
this.$el.innerText = message;
|
||||
this.$el.innerText = typeof message === "object" ? message.message : message;
|
||||
this.show();
|
||||
this.hideTimeout = setTimeout(_ => this.hide(), 5000);
|
||||
|
||||
if (typeof message === "object" && message.persistent) return;
|
||||
|
||||
this.hideTimeout = setTimeout(() => this.hide(), 5000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue