This is an automated email from the ASF dual-hosted git repository.
sebb 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 7b7f8dc Another shared global
7b7f8dc is described below
commit 7b7f8dcdd6626f74cae393c2b0e0c20d47daa894
Author: Sebb <[email protected]>
AuthorDate: Thu Nov 18 17:27:28 2021 +0000
Another shared global
---
webui/js/source/aavariables.js | 1 +
webui/js/source/construct-thread.js | 3 +--
webui/js/source/key-commands.js | 6 +++---
webui/js/source/render-email.js | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/webui/js/source/aavariables.js b/webui/js/source/aavariables.js
index 55d743b..db1631f 100644
--- a/webui/js/source/aavariables.js
+++ b/webui/js/source/aavariables.js
@@ -31,6 +31,7 @@ let G_current_year = 0;
let G_current_month = 0;
let G_current_quick_search = '';
let G_current_query = '';
+let G_current_open_email = null;
let G_select_primed = false;
let G_ponymail_preferences = {};
let G_ponymail_search_list = 'this';
diff --git a/webui/js/source/construct-thread.js
b/webui/js/source/construct-thread.js
index ee1780d..7f44762 100644
--- a/webui/js/source/construct-thread.js
+++ b/webui/js/source/construct-thread.js
@@ -14,7 +14,6 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
-let current_open_email = null;
function expand_email_threaded(idx, flat) {
let placeholder = document.getElementById('email_%u'.format(idx));
@@ -37,7 +36,7 @@ function expand_email_threaded(idx, flat) {
// Construct the base scaffolding for all emails
let eml = flat ? G_current_json.emails[idx] :
G_current_json.thread_struct[idx];
if (eml) {
- current_open_email = eml.tid || eml.mid;
+ G_current_open_email = eml.tid || eml.mid;
}
let thread = construct_thread(eml);
placeholder.inject(thread);
diff --git a/webui/js/source/key-commands.js b/webui/js/source/key-commands.js
index 644dae2..a5949c5 100644
--- a/webui/js/source/key-commands.js
+++ b/webui/js/source/key-commands.js
@@ -159,9 +159,9 @@ function keyCommands(e) {
compose_email(null, `${G_current_list}@${G_current_domain}`);
return;
case 'r':
- console.log(current_open_email);
- if (current_open_email && full_emails[current_open_email]) {
- compose_email(current_open_email);
+ console.log(G_current_open_email);
+ if (G_current_open_email && full_emails[G_current_open_email])
{
+ compose_email(G_current_open_email);
}
return;
case 'Escape':
diff --git a/webui/js/source/render-email.js b/webui/js/source/render-email.js
index 6fe5ed0..cd46a9b 100644
--- a/webui/js/source/render-email.js
+++ b/webui/js/source/render-email.js
@@ -251,7 +251,7 @@ async function render_email_chatty(state, json) {
author_field.inject([gravatar, author_nametag]);
div.inject(author_field);
let chatty_body = fixup_quotes(json.body);
- if (json.mid == current_open_email) {
+ if (json.mid == G_current_open_email) {
let header = new HTML('h4', {
class: 'chatty_title_inline'
}, json.subject);