From c6339f4e5d9497baeddff97f22e82b359e73e60e Mon Sep 17 00:00:00 2001 From: KOWX712 Date: Wed, 11 Dec 2024 16:27:59 +0800 Subject: [PATCH] Add back missing no connection prompt --- module/common/get_extra.sh | 2 +- module/webui/index.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/module/common/get_extra.sh b/module/common/get_extra.sh index d75be53..883c316 100644 --- a/module/common/get_extra.sh +++ b/module/common/get_extra.sh @@ -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 diff --git a/module/webui/index.js b/module/webui/index.js index 19c07aa..e2641a7 100644 --- a/module/webui/index.js +++ b/module/webui/index.js @@ -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';