Enable splash screens on Android 12+
This commit is contained in:
parent
cba69ca1b1
commit
b53aaeec4e
@ -8,6 +8,7 @@ import de.mm20.launcher2.badges.BadgeRepository
|
||||
import de.mm20.launcher2.favorites.FavoritesRepository
|
||||
import de.mm20.launcher2.icons.IconRepository
|
||||
import de.mm20.launcher2.icons.LauncherIcon
|
||||
import de.mm20.launcher2.ktx.isAtLeastApiLevel
|
||||
import de.mm20.launcher2.search.data.Searchable
|
||||
import kotlinx.coroutines.flow.Flow
|
||||
import org.koin.core.component.KoinComponent
|
||||
@ -58,7 +59,11 @@ abstract class SearchableItemVM(
|
||||
} else {
|
||||
ActivityOptionsCompat.makeBasic()
|
||||
}
|
||||
if (searchable.launch(context, options.toBundle())) {
|
||||
val bundle = options.toBundle()
|
||||
if (isAtLeastApiLevel(31)) {
|
||||
bundle?.putInt("android.activity.splashScreenStyle", 1)
|
||||
}
|
||||
if (searchable.launch(context, bundle)) {
|
||||
favoritesRepository.incrementLaunchCounter(searchable)
|
||||
return true
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user