You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by hu...@apache.org on 2021/10/29 17:26:12 UTC

[incubator-ponymail-foal] branch master updated: use switch_project which is more reliable

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


The following commit(s) were added to refs/heads/master by this push:
     new be08ff4  use switch_project which is more reliable
be08ff4 is described below

commit be08ff40050cf79452a9299ec8bae7aaef221689
Author: Daniel Gruno <hu...@apache.org>
AuthorDate: Fri Oct 29 19:26:01 2021 +0200

    use switch_project which is more reliable
---
 webui/js/ponymail.js           | 4 +---
 webui/js/source/preferences.js | 4 +---
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/webui/js/ponymail.js b/webui/js/ponymail.js
index cfdb13d..1ffc967 100644
--- a/webui/js/ponymail.js
+++ b/webui/js/ponymail.js
@@ -3176,9 +3176,7 @@ function init_preferences(state, json) {
                         onclick: 'location.href="oauth.html";'
                     }, "Click here to log in via OAuth"));
                 } else {
-                    console.log(current_domain);
-                    let first_list = Object.keys(json.lists[current_domain])[0];
-                    location.href = `?${first_list}@${current_domain}`;
+                    switch_project(current_domain);
                 }
             }
         }
diff --git a/webui/js/source/preferences.js b/webui/js/source/preferences.js
index ee13a4d..784d6d0 100644
--- a/webui/js/source/preferences.js
+++ b/webui/js/source/preferences.js
@@ -84,9 +84,7 @@ function init_preferences(state, json) {
                         onclick: 'location.href="oauth.html";'
                     }, "Click here to log in via OAuth"));
                 } else {
-                    console.log(current_domain);
-                    let first_list = Object.keys(json.lists[current_domain])[0];
-                    location.href = `?${first_list}@${current_domain}`;
+                    switch_project(current_domain);
                 }
             }
         }