Reduce use of isMobile()

This commit is contained in:
the-djmaze 2023-02-23 15:43:32 +01:00
parent 6af13255f2
commit 8623bb5d60
9 changed files with 28 additions and 23 deletions

View file

@ -183,7 +183,7 @@ export class AppUser extends AbstractApp {
super.bootstart();
addEventListener('beforeunload', event => {
if (arePopupsVisible() || (ThemeStore.isMobile() && MessageUserStore.message())) {
if (arePopupsVisible() || (!SettingsUserStore.layout() && MessageUserStore.message())) {
event.preventDefault();
return event.returnValue = i18n('POPUPS_ASK/EXIT_ARE_YOU_SURE');
}