Compare commits

...

3 Commits

Author SHA1 Message Date
schlagmichdoch 828caa4226
Merge pull request #286 from codyandersan/patch-1
Removed duplicate feature in README.md
2024-04-17 20:43:02 +02:00
schlagmichdoch 35f47d9063 Fix inner text being cleared when viewing next received text from queue + prevent skipping of queue entry when timing is bad by checking for existing timeout
Co-authored-by: klmkyo <mail@mklimek.dev>
2024-04-17 20:38:33 +02:00
Cody Andersan 6ca37bd390
Update README.md
Removed duplicate feature.
2024-03-31 08:42:03 +05:30
2 changed files with 12 additions and 10 deletions

View File

@ -39,7 +39,6 @@ Send a file from your phone to your laptop?
* Connect to devices in complex network environments (public Wi-Fi, company network, iCloud Private Relay, VPN, etc.).
* Connect to devices on your mobile hotspot.
* Devices outside of your local network that are behind a NAT are auto-connected via the PairDrop TURN server.
* Connect to devices on your mobile hotspot.
* Devices from the local network, in the same public room, or previously paired are shown.
#### Persistent Device Pairing

View File

@ -2017,6 +2017,7 @@ class ReceiveTextDialog extends Dialog {
this.$displayName = this.$el.querySelector('.display-name');
this._receiveTextQueue = [];
this._hideTimeout = null;
}
selectionEmpty() {
@ -2040,17 +2041,12 @@ class ReceiveTextDialog extends Dialog {
this._setDocumentTitleMessages();
changeFavicon("images/favicon-96x96-notification.png");
if (this.isShown()) return;
if (this.isShown() || this._hideTimeout) return;
this._dequeueRequests();
}
_dequeueRequests() {
if (!this._receiveTextQueue.length) {
this.$text.innerHTML = "";
return;
}
this._setDocumentTitleMessages();
changeFavicon("images/favicon-96x96-notification.png");
@ -2145,9 +2141,16 @@ class ReceiveTextDialog extends Dialog {
hide() {
super.hide();
setTimeout(() => {
this._dequeueRequests();
this.$text.innerHTML = "";
// If queue is empty -> clear text field | else -> open next message
this._hideTimeout = setTimeout(() => {
if (!this._receiveTextQueue.length) {
this.$text.innerHTML = "";
}
else {
this._dequeueRequests();
}
this._hideTimeout = null;
}, 500);
}
}