mirror of
https://github.com/MetaCubeX/ClashMetaForAndroid.git
synced 2026-05-09 18:11:26 +08:00
feat: add rotate anim to profile update btn
This commit is contained in:
@@ -105,7 +105,7 @@ class MetaFeatureSettingsActivity : BaseActivity<MetaFeatureSettingsDesign>() {
|
||||
val ext = "." + displayName.substringAfterLast(".")
|
||||
if(!validDatabaseExtensions.contains(ext))
|
||||
{
|
||||
val dialog = MaterialAlertDialogBuilder(this)
|
||||
MaterialAlertDialogBuilder(this)
|
||||
.setTitle("Unknown Database Format")
|
||||
.setMessage("Only ${validDatabaseExtensions.joinToString("/")} are supported")
|
||||
.setPositiveButton("OK"){ _, _ -> }
|
||||
|
||||
@@ -6,8 +6,10 @@ import com.github.kr328.clash.common.util.ticker
|
||||
import com.github.kr328.clash.design.ProfilesDesign
|
||||
import com.github.kr328.clash.service.model.Profile
|
||||
import com.github.kr328.clash.util.withProfile
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.isActive
|
||||
import kotlinx.coroutines.selects.select
|
||||
import kotlinx.coroutines.withContext
|
||||
import java.util.concurrent.TimeUnit
|
||||
|
||||
class ProfilesActivity : BaseActivity<ProfilesDesign>() {
|
||||
@@ -34,9 +36,16 @@ class ProfilesActivity : BaseActivity<ProfilesDesign>() {
|
||||
startActivity(NewProfileActivity::class.intent)
|
||||
ProfilesDesign.Request.UpdateAll ->
|
||||
withProfile {
|
||||
queryAll().forEach { p ->
|
||||
if (p.imported && p.type != Profile.Type.File)
|
||||
update(p.uuid)
|
||||
try {
|
||||
queryAll().forEach { p ->
|
||||
if (p.imported && p.type != Profile.Type.File)
|
||||
update(p.uuid)
|
||||
}
|
||||
}
|
||||
finally {
|
||||
withContext(Dispatchers.Main) {
|
||||
design.finishUpdateAll();
|
||||
}
|
||||
}
|
||||
}
|
||||
is ProfilesDesign.Request.Update ->
|
||||
|
||||
Reference in New Issue
Block a user