From 562f67092183fc7f039adb9cc3c157a03b0c1b65 Mon Sep 17 00:00:00 2001 From: ansuz Date: Thu, 3 May 2018 10:18:36 +0200 Subject: [PATCH] hide visible effects of race condition, leave a note to remember to fix it --- www/file/inner.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/www/file/inner.js b/www/file/inner.js index b90f392a1..ecd4fede2 100644 --- a/www/file/inner.js +++ b/www/file/inner.js @@ -124,6 +124,12 @@ define([ var rightsideDisplayed = false; $(window.document).on('decryption', function (e) { + /* FIXME + we're listening for decryption events and assuming that only + the main media-tag exists. In practice there is also your avatar + and there could be other things in the future, so we should + figure out a generic way target media-tag decryption events. + */ var decrypted = e.originalEvent; if (decrypted.callback) { decrypted.callback(); @@ -133,9 +139,6 @@ define([ $dlform.hide(); var $dlButton = $dlview.find('media-tag button'); if (ev) { $dlButton.click(); } - if (!$dlButton.length) { - $appContainer.css('background', 'white'); - } $dlButton.addClass('btn btn-success'); var text = Messages.download_mt_button + '
'; text += '' + Util.fixHTML(title) + '
';