Browse Source

Refresh cards when making list (close #7)

tags/v1.2.0
Skylar Ittner 10 months ago
parent
commit
1425e8de56
1 changed files with 4 additions and 1 deletions
  1. 4
    1
      www/js/home.js

+ 4
- 1
www/js/home.js View File

@@ -4,6 +4,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/

var force_card_refresh = false;

$(".view-main").on("ptr:refresh", ".ptr-content", function () {
loadCards(function () {
@@ -51,7 +52,7 @@ $(".view-main").on("click", ".parsedown-task-list", function (e) {
});

function loadNotesToCards(notes, oldnotes, callback) {
if (notes.length == oldnotes.length) {
if (force_card_refresh != true && notes.length == oldnotes.length) {
var allSame = true;
var allPresent = true;
for (var n in notes) {
@@ -70,6 +71,7 @@ function loadNotesToCards(notes, oldnotes, callback) {
return;
}
}
force_card_refresh = false;
for (i in window.shuffleInstance.items) {
window.shuffleInstance.remove(window.shuffleInstance.items[i]);
}
@@ -162,6 +164,7 @@ function makeList(id) {
note.toChecklist();
note.setModified();
note.saveNote();
force_card_refresh = true;
app.ptr.refresh();
}


Loading…
Cancel
Save