From af7380909716ca4d71a5ed81576be8d957e67566 Mon Sep 17 00:00:00 2001 From: Mirco Wittrien Date: Tue, 16 Apr 2019 10:03:38 +0200 Subject: [PATCH] stuff --- Plugins/PluginRepo/PluginRepo.plugin.js | 7 +++---- Plugins/ThemeRepo/ThemeRepo.plugin.js | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Plugins/PluginRepo/PluginRepo.plugin.js b/Plugins/PluginRepo/PluginRepo.plugin.js index 0298fd4bb6..f5f1b4421b 100644 --- a/Plugins/PluginRepo/PluginRepo.plugin.js +++ b/Plugins/PluginRepo/PluginRepo.plugin.js @@ -473,7 +473,6 @@ class PluginRepo { let instPlugin = window.bdplugins[plugin.getName] ? window.bdplugins[plugin.getName].plugin : null; if (instPlugin && this.getString(instPlugin.getAuthor()).toUpperCase() == plugin.getAuthor.toUpperCase()) plugin.getState = this.getString(instPlugin.getVersion()) != plugin.getVersion ? 1 : 0; else plugin.getState = 2; - plugin.getFav = favorites[url] ? 0 : 1; let data = { url: plugin.url, search: (plugin.getName + " " + plugin.getVersion + " " + plugin.getAuthor + " " + plugin.getDescription).toUpperCase(), @@ -481,8 +480,8 @@ class PluginRepo { version: plugin.getVersion, author: plugin.getAuthor, description: plugin.getDescription ? plugin.getDescription : "No Description found.", - fav: plugin.getFav, - new: !this.cachedPlugins.includes(url), + fav: favorites[url] ? 0 : 1, + new: !this.cachedPlugins.includes(url) ? 0 : 1, state: plugin.getState }; pluginRepoModal.entries[url] = data; @@ -666,7 +665,7 @@ class PluginRepo { if (oldbarbutton) oldbarbutton.click(); var bar = BDFDB.createNotificationsBar(`There are ${newentries} new Plugin${newentries == 1 ? "" : "s"} in the Repo. Check:`,{type:"success",btn:"PluginRepo",selector:"pluginrepo-notice pluginrepo-newentries-notice"}); bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", e => { - this.openPluginRepoModal({forcedSort:"new",forcedOrder:"desc"}); + this.openPluginRepoModal({forcedSort:"new",forcedOrder:"asc"}); bar.querySelector(BDFDB.dotCN.noticedismiss).click(); }); } diff --git a/Plugins/ThemeRepo/ThemeRepo.plugin.js b/Plugins/ThemeRepo/ThemeRepo.plugin.js index 2be32c5e04..be77f1a95a 100644 --- a/Plugins/ThemeRepo/ThemeRepo.plugin.js +++ b/Plugins/ThemeRepo/ThemeRepo.plugin.js @@ -585,7 +585,6 @@ class ThemeRepo { let instTheme = window.bdthemes[this.loadedThemes[url].name]; if (instTheme && instTheme.author.toUpperCase() == theme.author.toUpperCase()) theme.state = instTheme.version != theme.version ? 1 : 0; else theme.state = 2; - theme.fav = favorites[url] ? 0 : 1; let data = { url: theme.url, search: (theme.name + " " + theme.version + " " + theme.author + " " + theme.description).toUpperCase(), @@ -593,8 +592,8 @@ class ThemeRepo { version: theme.version, author: theme.author, description: theme.description, - fav: theme.fav, - new: !this.cachedThemes.includes(url), + fav: favorites[url] ? 0 : 1, + new: !this.cachedThemes.includes(url) ? 0 : 1, state: theme.state, css: theme.css }; @@ -783,7 +782,7 @@ class ThemeRepo { if (oldbarbutton) oldbarbutton.click(); var bar = BDFDB.createNotificationsBar(`There are ${newentries} new Theme${newentries == 1 ? "" : "s"} in the Repo. Check:`,{type:"success",btn:"ThemeRepo",selector:"themerepo-notice themerepo-newentries-notice"}); bar.querySelector(BDFDB.dotCN.noticebutton).addEventListener("click", e => { - this.openThemeRepoModal({forcedSort:"new",forcedOrder:"desc"}); + this.openThemeRepoModal({forcedSort:"new",forcedOrder:"asc"}); bar.querySelector(BDFDB.dotCN.noticedismiss).click(); }); }