Update 0BDFDB.plugin.js

This commit is contained in:
Mirco Wittrien 2022-05-26 14:28:36 +02:00
parent 557ce6e59b
commit e55a8defcd
1 changed files with 2 additions and 8 deletions

View File

@ -9146,17 +9146,11 @@ module.exports = (_ => {
})
}),
onClick: _ => {
let loadingString = `${BDFDB.LanguageUtils.LanguageStrings.CHECKING_FOR_UPDATES} - ${BDFDB.LanguageUtils.LibraryStrings.please_wait}`;
let currentLoadingString = loadingString;
let toastInterval, toast = BDFDB.NotificationUtils.toast(loadingString, {
let toast = BDFDB.NotificationUtils.toast(`${BDFDB.LanguageUtils.LanguageStrings.CHECKING_FOR_UPDATES} - ${BDFDB.LanguageUtils.LibraryStrings.please_wait}`, {
type: "info",
timeout: 0,
onClose: _ => BDFDB.TimeUtils.clear(toastInterval)
ellipsis: true
});
toastInterval = BDFDB.TimeUtils.interval(_ => {
currentLoadingString = currentLoadingString.endsWith(".....") ? loadingString : currentLoadingString + ".";
toast.update(currentLoadingString);
}, 500);
BDFDB.PluginUtils.checkAllUpdates().then(outdated => {
toast.close();
if (outdated > 0) BDFDB.NotificationUtils.toast(BDFDB.LanguageUtils.LibraryStringsFormat("update_check_complete_outdated", outdated), {