Skip to content

Commit

Permalink
Merge pull request #4270 from knighthat/reset-var
Browse files Browse the repository at this point in the history
Reset confirmCount after 5s
  • Loading branch information
fast4x authored Oct 28, 2024
2 parents 5e58774 + f6ed99f commit d84be3e
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ import it.fast4x.rimusic.utils.preferences
import it.fast4x.rimusic.utils.rememberPreference
import it.fast4x.rimusic.utils.showSearchTabKey
import it.fast4x.rimusic.utils.showStatsInNavbarKey
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.delay
import kotlinx.coroutines.launch
import me.knighthat.Skeleton
import kotlin.system.exitProcess

Expand Down Expand Up @@ -253,6 +257,12 @@ fun HomeScreen(
context = context
)
confirmCount++

// Reset confirmCount after 5s
CoroutineScope( Dispatchers.Default ).launch {
delay( 5000L )
confirmCount = 0
}
} else {
val activity = context as? Activity
activity?.finishAffinity()
Expand Down

0 comments on commit d84be3e

Please sign in to comment.