From 30b94fb19467c023cf299a2c37f5063e85c4bb18 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Tue, 2 Mar 2021 12:22:48 +0300 Subject: store widescreen mode setting in preferences instead of a cookie --- js/App.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/App.js') diff --git a/js/App.js b/js/App.js index 8eda5ac9d..f792cf2e1 100644 --- a/js/App.js +++ b/js/App.js @@ -779,7 +779,7 @@ const App = { this.setLoadingProgress(50); this._widescreen_mode = this.getInitParam("widescreen"); - this.switchPanelMode(this._widescreen_mode); + this.setWidescreen(this._widescreen_mode); Headlines.initScrollHandler(); @@ -867,7 +867,7 @@ const App = { } } }, - switchPanelMode: function(wide) { + setWidescreen: function(wide) { const article_id = Article.getActive(); if (wide) { @@ -908,7 +908,7 @@ const App = { if (article_id) Article.view(article_id); - xhr.post("backend.php", {op: "rpc", method: "setpanelmode", wide: wide ? 1 : 0}); + xhr.post("backend.php", {op: "rpc", method: "setWidescreen", wide: wide ? 1 : 0}); }, initHotkeyActions: function() { if (this.is_prefs) { @@ -1168,7 +1168,7 @@ const App = { Cookie.set("ttrss_ci_width", 0); Cookie.set("ttrss_ci_height", 0); - this.switchPanelMode(this._widescreen_mode); + this.setWidescreen(this._widescreen_mode); } else { alert(__("Widescreen is not available in combined mode.")); } @@ -1258,7 +1258,7 @@ const App = { Cookie.set("ttrss_ci_width", 0); Cookie.set("ttrss_ci_height", 0); - this.switchPanelMode(this._widescreen_mode); + this.setWidescreen(this._widescreen_mode); } else { alert(__("Widescreen is not available in combined mode.")); } -- cgit v1.2.3