Closed Anduin2017 closed 4 years ago
I think we should find a way to make the server not to push notification since if the service worker doesn't do anything when receive a push, an notification reads This website is updating at the background
will be shown.
OK. I will try to find a solution. Please wait.
Maybe I have found some other way to disable it, I will try it tomorrow.
I have developed a new API dropDevice
.
Path: /devices/dropdevice/{deviceId}
Method: HTTP POST
IsElectron || serverReturnedDevices.Any(currentDeviceId)
Call drop device API and save the bool to local storage.
Cal add device API and save the bool to local storage.
if (!electron) {
var connected = serverReturnedDevices.Any(currentDeviceId);
if (localstorage["EnablePush"] == true && !connected ) {
AddCurrentDevice();
}
else if (localstorage["EnablePush"] == false && connected )) {
DropCurrentDevice();
}
}
EnablePush
Shall be true
by default.
@hv0905 how about this?
Nice fix! @hv0905
Describe the solution you'd like
When I logged in my Kahla account on multiple browsers, like both edge and chrome, when a new notification arrives, I will be notified twice. That is pretty annoying.
So I wish that I can disable one of the notifications.
Describe alternatives you've considered
Currently, I have to disable it here.
Additional context
I wish there is a setting named
Show push notification
.By default, it is true.
If I disable this switch, My device will not be registered to the server so I won't receive any notification on this device.
This setting will not be synced to other devices.