File tree Expand file tree Collapse file tree
app/src/main/java/io/nekohasekai/sagernet/widget Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -67,11 +67,12 @@ class ServiceButton @JvmOverloads constructor(
6767 private val iconConnecting by lazy {
6868 AnimatedState (R .drawable.ic_service_connecting) {
6969 hideProgress()
70- delayedAnimation = context.unwrap<LifecycleOwner >().lifecycleScope.launch {
70+ val owner = context.unwrap<LifecycleOwner >()
71+ delayedAnimation = owner.lifecycleScope.launch {
7172 delay(context.resources.getInteger(android.R .integer.config_mediumAnimTime) + 1000L )
7273 // Gate the UI mutation on STARTED so a delayed progress reveal doesn't run
7374 // while the activity is stopped (the old launchWhenStarted suspended here).
74- context.unwrap< LifecycleOwner >() .withStarted {
75+ owner .withStarted {
7576 isIndeterminate = true
7677 show()
7778 }
You can’t perform that action at this time.
0 commit comments