From 54b43664ec12ff750ddeae488c1a0990bf5be783 Mon Sep 17 00:00:00 2001 From: LeGend-wLw <874644990@qq.com> Date: Sun, 4 Feb 2024 23:47:10 +0800 Subject: [PATCH] =?UTF-8?q?add:=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/com/lizongying/mytv/ChannelUtils.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/lizongying/mytv/ChannelUtils.kt b/app/src/main/java/com/lizongying/mytv/ChannelUtils.kt index b87fd2a..1d70396 100644 --- a/app/src/main/java/com/lizongying/mytv/ChannelUtils.kt +++ b/app/src/main/java/com/lizongying/mytv/ChannelUtils.kt @@ -89,6 +89,7 @@ object ChannelUtils { suspend fun getLocalVersion(context: Context): Int { return withContext(Dispatchers.IO) { val file = File(getAppDirectory(context), "channels") + //检查本地是否已经有保存的channels.json,若无保存的Channel.json则从读取assert中文件 val savedVersion = context.getSharedPreferences("saved_version", Context.MODE_PRIVATE).getInt("version", Integer.MIN_VALUE) if (!file.exists() || savedVersion == Integer.MIN_VALUE) {