diff --git a/apps/reply/interface.html b/apps/reply/interface.html index 2034a1195..ddad4ef35 100644 --- a/apps/reply/interface.html +++ b/apps/reply/interface.html @@ -61,14 +61,14 @@ function toggleVisibility() { let empty = document.getElementById("empty"); let loading = document.getElementById("loading"); - if (replies.length == 0) { - empty.setAttribute("class", "d-block"); - loading.setAttribute("class", "d-hide"); - } - else if (fetching) { + if (fetching) { loading.setAttribute("class", "d-block"); empty.setAttribute("class", "d-hide"); } + else if (replies.length == 0) { + empty.setAttribute("class", "d-block"); + loading.setAttribute("class", "d-hide"); + } else { loading.setAttribute("class", "d-hide"); empty.setAttribute("class", "d-hide"); @@ -105,7 +105,7 @@ var reply = {}; reply.text = document.getElementById('msg').value; replies.push(reply); - return updateDevice(); + updateDevice(); } function updateDevice() { @@ -114,10 +114,7 @@ Util.writeStorage("replies.json", JSON.stringify(replies), () => { fetching = false; renderReplyList(); - return true; }); - fetching = false; - return false; } diff --git a/apps/reply/lib.js b/apps/reply/lib.js index e390669e8..4a040c557 100644 --- a/apps/reply/lib.js +++ b/apps/reply/lib.js @@ -12,8 +12,6 @@ exports.reply = function (options) { responseMessage = { t: "notify", id: msg.id, n: "REPLY", msg: replyText }; } E.showMenu(); - layout.setUI(); - layout.render(); if (options.sendReply == null || options.sendReply) { Bluetooth.println(JSON.stringify(responseMessage)); } @@ -26,8 +24,6 @@ exports.reply = function (options) { title: options.title || /*LANG*/ "Reply with:", back: function () { E.showMenu(); - layout.setUI(); - layout.render(); reject("User pressed back"); }, }, // options @@ -56,8 +52,6 @@ exports.reply = function (options) { { buttons: { Ok: true }, remove: function () { - layout.setUI(); - layout.render(); reject( "Please install a keyboard app, or set a custom reply via the app loader!" );