diff --git a/build.gradle b/build.gradle index 73a8274942..62ef2aef8c 100644 --- a/build.gradle +++ b/build.gradle @@ -10,8 +10,8 @@ buildscript { compileSdkVersion = 29 buildToolsVersion = '29.0.3' desugarLibsVersion = '1.0.5' - versionCode = 439 - versionName = '5.0.6.8R' + versionCode = 441 + versionName = '5.0.6.9R' resConfigs = ['ar', 'es', 'fa', 'fr', 'ja', 'ko', 'ru', 'tr', 'zh-rCN', 'zh-rTW'] } diff --git a/core/src/main/java/com/github/shadowsocks/database/ProfileManager.kt b/core/src/main/java/com/github/shadowsocks/database/ProfileManager.kt index 8a97344f14..cb11c60023 100644 --- a/core/src/main/java/com/github/shadowsocks/database/ProfileManager.kt +++ b/core/src/main/java/com/github/shadowsocks/database/ProfileManager.kt @@ -87,6 +87,7 @@ object ProfileManager { } fun createProfilesFromSub(profiles: List, group: String) { + if (profiles.isNullOrEmpty())return val old = getAllProfilesByGroup(group).toMutableList() profiles.filter { for (i: Profile in old) if (it.isSameAs(i)) { diff --git a/core/src/main/java/com/github/shadowsocks/database/SSRSub.kt b/core/src/main/java/com/github/shadowsocks/database/SSRSub.kt index 3fc3fe2c67..08902cf28d 100644 --- a/core/src/main/java/com/github/shadowsocks/database/SSRSub.kt +++ b/core/src/main/java/com/github/shadowsocks/database/SSRSub.kt @@ -51,4 +51,7 @@ class SSRSub( fun isBuiltin(): Boolean { return VpnEncrypt.vpnGroupName == url_group } + fun isBuiltin2(): Boolean { + return VpnEncrypt.freesubGroupName == url_group + } } \ No newline at end of file diff --git a/core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt b/core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt index 823b80c148..d53d6d8feb 100644 --- a/core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt +++ b/core/src/main/java/com/github/shadowsocks/subscription/SubscriptionService.kt @@ -122,6 +122,7 @@ class SubscriptionService : Service(), CoroutineScope { private suspend fun fetchJson(ssrSub: SSRSub, max: Int, notification: NotificationCompat.Builder) { try { + if (ssrSub.isBuiltin()||ssrSub.isBuiltin2())return SSRSubManager.update(ssrSub) } catch (e: Exception) { ssrSub.status = SSRSub.NETWORK_ERROR diff --git a/gitupdate.bat b/gitupdate.bat index 42846d85a9..d42a9bb69b 100644 --- a/gitupdate.bat +++ b/gitupdate.bat @@ -3,6 +3,6 @@ git pull origin master git add -A git commit -m "update" git push origin master -git tag -a v5.0.6.8 -m "release v5.0.6.8" +git tag -a v5.0.6.9 -m "release v5.0.6.9" git push origin --tags pause \ No newline at end of file diff --git a/mobile/src/main/java/com/github/shadowsocks/subscription/SubscriptionFragment.kt b/mobile/src/main/java/com/github/shadowsocks/subscription/SubscriptionFragment.kt index 4279418864..11633c295f 100644 --- a/mobile/src/main/java/com/github/shadowsocks/subscription/SubscriptionFragment.kt +++ b/mobile/src/main/java/com/github/shadowsocks/subscription/SubscriptionFragment.kt @@ -148,13 +148,14 @@ class SubscriptionFragment : ToolbarFragment(), Toolbar.OnMenuItemClickListener @SuppressLint("SetTextI18n") fun bind(item: SSRSub) { + if(item.isBuiltin()||item.isBuiltin2())return this.item = item text.text = "${item.getStatue(requireContext())}\t${item.url_group}" } override fun onClick(v: View?) { if (item.id == 0L) return - if (item.isBuiltin() || VpnEncrypt.freesubGroupName == item.url_group) return + if(item.isBuiltin()||item.isBuiltin2()) return SubDialogFragment().withArg(SubItem(adapterPosition, item.url, item.url_group)) .show(this@SubscriptionFragment, REQUEST_CODE_EDIT) }