mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
remove autosave and update variable declerations
This commit is contained in:
parent
8af1142000
commit
df2af2a6ef
4 changed files with 20 additions and 41 deletions
|
@ -18,10 +18,10 @@ import 'listViewStyle';
|
|||
}
|
||||
}
|
||||
|
||||
var homescreenSettingsInstance;
|
||||
var hasChanges;
|
||||
var userId = params.userId || ApiClient.getCurrentUserId();
|
||||
var currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
let homescreenSettingsInstance;
|
||||
let hasChanges;
|
||||
const userId = params.userId || ApiClient.getCurrentUserId();
|
||||
const currentSettings = userId === ApiClient.getCurrentUserId() ? userSettings : new UserSettings();
|
||||
view.addEventListener('viewshow', function () {
|
||||
window.addEventListener('beforeunload', onBeforeUnload);
|
||||
|
||||
|
@ -39,16 +39,11 @@ import 'listViewStyle';
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
view.addEventListener('change', function () {
|
||||
hasChanges = true;
|
||||
});
|
||||
view.addEventListener('viewbeforehide', function () {
|
||||
hasChanges = false;
|
||||
|
||||
if (homescreenSettingsInstance) {
|
||||
homescreenSettingsInstance.submit();
|
||||
}
|
||||
});
|
||||
view.addEventListener('viewdestroy', function () {
|
||||
if (homescreenSettingsInstance) {
|
||||
homescreenSettingsInstance.destroy();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue