-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The APIs that are not supported by every browser or may not always be allowed (Battery and Wake Lock) are requested in try catch blocks. The problem was that both of them actually yield promises. If the promises fail, then those exceptions would not be caught properly, because we forgot to await them. So especially for the wake lock you would sometimes see an error message when it gets hot reloaded. This should be fixed now. Additionally this changes the window title for when there are unsaved changes. Apparently when LiveSplit One is used as a PWA, then at least Chrome wants to always keep the app name in the title. If the title itself is changed, then it gets shown as `LiveSplit One - The new title`. By us putting an asterisk in the front of the title, the PWA then shows `LiveSplit One - *LiveSplit One`, which is pretty bad. I noticed that if the app name is also the prefix of the title, Chrome recognizes that and does not end up showing the app name twice. There also was a small bug in the event sink where the `togglePauseOrStart` event did not update the splits modified state.
- Loading branch information
Showing
4 changed files
with
47 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters