From 1deedec58cdb854da978e54f10e7e4755b35302e Mon Sep 17 00:00:00 2001 From: Gordon Williams Date: Tue, 9 Apr 2024 14:07:14 +0100 Subject: [PATCH] If we have the info, default to Sort by Favourited - fix https://github.com/espruino/BangleApps/issues/3329 --- js/index.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/index.js b/js/index.js index f999fef..79b6c68 100644 --- a/js/index.js +++ b/js/index.js @@ -162,6 +162,12 @@ if (Const.APP_USAGE_JSON) httpGet(Const.APP_USAGE_JSON).then(jsonTxt=>{ document.querySelector(".sort-nav").classList.remove("hidden"); document.querySelector(".sort-nav label[sortid='installs']").classList.remove("hidden"); document.querySelector(".sort-nav label[sortid='favourites']").classList.remove("hidden"); + // actually set to sort on favourites + if (activeSort != "favourites") { + activeSort = "favourites"; + refreshSort(); + refreshLibrary(); + } }).catch(err=>{ console.log("No recent.csv - app sort disabled"); });