Add back missing no connection prompt

This commit is contained in:
KOWX712
2024-12-11 16:27:59 +08:00
parent 4c9e56c1db
commit c6339f4e5d
2 changed files with 7 additions and 2 deletions

View File

@@ -54,7 +54,7 @@ get_xposed() {
check_update() {
check_wget
if [ -d "$MODPATH/update" ]; then
JSON=$(wget --no-check-certificate -q -O - "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/update.json")
JSON=$(wget --no-check-certificate -q -O - "https://raw.githubusercontent.com/KOWX712/Tricky-Addon-Update-Target-List/main/update.json") || exit 1
REMOTE_VERSION=$(echo "$JSON" | grep -o '"versionCode": *[0-9]*' | awk -F: '{print $2}' | tr -d ' ')
LOCAL_VERSION=$(grep -o 'versionCode=[0-9]*' "$MODPATH/update/module.prop" | awk -F= '{print $2}')
if [ "$REMOTE_VERSION" -gt "$LOCAL_VERSION" ]; then

View File

@@ -318,7 +318,12 @@ async function refreshAppList() {
await new Promise(resolve => setTimeout(resolve, 500));
window.scrollTo(0, 0);
if (noConnection.style.display === "flex") {
await updateCheck();
try {
await updateCheck();
await execCommand(`[ -f ${basePath}common/tmp/exclude-list ] && rm -f "${basePath}common/tmp/exclude-list"`);
} catch (error) {
console.error("Error occurred:", error);
}
}
await fetchAppList();
loadingIndicator.style.display = 'none';