Don't require desktop notifications for disconnections (#1535)

This commit is contained in:
urkerab 2020-06-26 12:51:56 +01:00 committed by GitHub
parent bb24d2f3e3
commit 9de28f5f00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -509,10 +509,7 @@ function toId() {
if (showNotification !== false && (self.popups.length || !self.focused) && window.Notification) {
self.rooms[''].requestNotifications();
var disconnect = new Notification("Disconnected!", {lang: 'en', body: "You have been disconnected from Pokémon Showdown."});
disconnect.onclick = function (e) {
window.focus();
};
self.rooms[''].notifyOnce("Disconnected", "You have been disconnected from Pokémon Showdown.", 'disconnected');
}
self.rooms[''].updateFormats();