This is an automated email from the ASF dual-hosted git repository.

humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git

commit 44b64db6981ee55f9b2638118f504722449c3af6
Author: Daniel Gruno <[email protected]>
AuthorDate: Tue Oct 5 19:10:03 2021 +0200

    shorten call to preferences
---
 webui/js/ponymail.js    | 6 ++++--
 webui/js/source/mgmt.js | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index f1cb2b9..283f985 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -3083,8 +3083,10 @@ function admin_audit_next() {
 // Onload function for admin.html
 function admin_init() {
     init_preferences(); // blank call to load defaults like social rendering
-    GET('%sapi/preferences.lua'.format(apiURL), init_preferences, null);
-    GET('%sapi/preferences.lua'.format(apiURL), (state, json) => {mgmt_prefs = 
json}, null);
+    GET('%sapi/preferences.lua'.format(apiURL), (state, json) => {
+        mgmt_prefs = json
+        init_preferences(state, json);
+    }, null);
     let mid = location.href.split('/').pop();
     // Specific email/list handling?
     if (mid.length > 0) {
diff --git a/webui/js/source/mgmt.js b/webui/js/source/mgmt.js
index 319e41e..d927b42 100644
--- a/webui/js/source/mgmt.js
+++ b/webui/js/source/mgmt.js
@@ -402,8 +402,10 @@ function admin_audit_next() {
 // Onload function for admin.html
 function admin_init() {
     init_preferences(); // blank call to load defaults like social rendering
-    GET('%sapi/preferences.lua'.format(apiURL), init_preferences, null);
-    GET('%sapi/preferences.lua'.format(apiURL), (state, json) => {mgmt_prefs = 
json}, null);
+    GET('%sapi/preferences.lua'.format(apiURL), (state, json) => {
+        mgmt_prefs = json
+        init_preferences(state, json);
+    }, null);
     let mid = location.href.split('/').pop();
     // Specific email/list handling?
     if (mid.length > 0) {

Reply via email to