abuicke / SolitaryFitness

Companion app to Solitary Fitness by Charles Bronson
1 stars 0 forks source link

Application Scope #67

Open abuicke opened 7 months ago

abuicke commented 7 months ago

Need to recheck the functioning of application scope. I'm basically relying on Android killing the app process to cancel the scope for me, otherwise it runs indefinitely and has all the same drawbacks as using [kotlinx.coroutines.GlobalScope]. Is there a use case for an activity level scope that the activity is responsible for cancelling? I do not want to use [lifecycleScope] because that will kill the coroutines whenever the activity is off screen (i.e. paused) which may not be the desired behavior. This would make an even better case for a base activity that handles common logic I want across all activities such as showing the snackbar etc.