Skip to content

Commit

Permalink
Glimpse: Allow multiple selection for non-pick intents
Browse files Browse the repository at this point in the history
Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/8255
Change-Id: Iaefe604e4bf31365ec4868b3b1096d921b0cf485
  • Loading branch information
luk1337 committed Feb 3, 2025
1 parent be8eec5 commit c9a90aa
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,12 @@ class IntentsViewModel(application: Application) : GlimpseViewModel(application)
*/
@OptIn(ExperimentalCoroutinesApi::class)
val allowMultipleSelection = parsedIntent
.mapLatest { it is ParsedIntent.PickIntent && it.multiple }
.mapLatest {
when (it) {
is ParsedIntent.PickIntent -> it.multiple
else -> true
}
}
.flowOn(Dispatchers.IO)
.stateIn(
viewModelScope,
Expand Down

0 comments on commit c9a90aa

Please sign in to comment.