Wait until search actions are ready before presenting any results
This commit is contained in:
@@ -8,6 +8,7 @@ import androidx.compose.animation.core.updateTransition
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.RowScope
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
@@ -52,7 +53,7 @@ fun SearchBar(
|
||||
reverse: Boolean = false,
|
||||
darkColors: Boolean = false,
|
||||
menu: @Composable RowScope.() -> Unit = {},
|
||||
actions: @Composable () -> Unit = {},
|
||||
actions: @Composable ColumnScope.() -> Unit = {},
|
||||
) {
|
||||
|
||||
val transition = updateTransition(level, label = "Searchbar")
|
||||
@@ -179,7 +180,7 @@ fun SearchBar(
|
||||
menu()
|
||||
}
|
||||
}
|
||||
actions()
|
||||
this.actions()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ package de.mm20.launcher2.ui.launcher.searchbar
|
||||
|
||||
import android.content.Intent
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.foundation.layout.ColumnScope
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -24,7 +25,7 @@ import de.mm20.launcher2.ui.component.SearchActionIcon
|
||||
import de.mm20.launcher2.ui.settings.SettingsActivity
|
||||
|
||||
@Composable
|
||||
fun SearchBarActions(
|
||||
fun ColumnScope.SearchBarActions(
|
||||
modifier: Modifier = Modifier,
|
||||
actions: List<SearchAction>,
|
||||
reverse: Boolean = false,
|
||||
|
||||
Reference in New Issue
Block a user