piggy feature
This commit is contained in:
+4
-1
@@ -9,6 +9,7 @@ import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.material3.TopAppBarScrollBehavior
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.runtime.compositionLocalOf
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Modifier
|
||||
import com.seiko.imageloader.LocalImageLoader
|
||||
@@ -30,9 +31,11 @@ import ru.shadowsparky.vbox.shared.presentation.settings.register.RegisterScreen
|
||||
import ru.shadowsparky.vbox.shared.presentation.settings.serv.EditServScreen
|
||||
import ru.shadowsparky.vbox.shared.presentation.settings.tag.TagScreen
|
||||
|
||||
val LocalColorSchemeProvider = compositionLocalOf<ColorScheme?> { null }
|
||||
|
||||
@Composable
|
||||
fun getColorScheme(): ColorScheme {
|
||||
return ru.shadowsparky.ui.theme.getColorScheme()
|
||||
return LocalColorSchemeProvider.current ?: ru.shadowsparky.ui.theme.getColorScheme()
|
||||
}
|
||||
|
||||
@Composable
|
||||
|
||||
+2
-7
@@ -92,7 +92,6 @@ fun SearchScreen(
|
||||
BaseMainScreen(
|
||||
appBar = {
|
||||
SearchAppBar(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
textFieldValue = textFieldValue,
|
||||
onDone = { component.done(textFieldValue.text) },
|
||||
onValueChange = { textFieldValue = it },
|
||||
@@ -214,7 +213,6 @@ expect fun Modifier.requestFocusOnDownEvent(focusRequester: FocusRequester): Mod
|
||||
@Composable
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
fun SearchAppBar(
|
||||
modifier: Modifier,
|
||||
textFieldValue: TextFieldValue,
|
||||
focusRequester: FocusRequester,
|
||||
onDone: () -> Unit,
|
||||
@@ -230,7 +228,7 @@ fun SearchAppBar(
|
||||
}
|
||||
val blur = LocalBlurState.current
|
||||
AppBarWithSearch(
|
||||
modifier = modifier.applyBlurEffect(blur),
|
||||
modifier = Modifier.applyBlurEffect(blur),
|
||||
state = rememberSearchBarState(),
|
||||
colors = ComponentDefaults.appBarWithSearchDefaults(),
|
||||
inputField = {
|
||||
@@ -316,10 +314,7 @@ fun AppBarWithSearch(
|
||||
BackButton { onBack() }
|
||||
Spacer(Modifier.width(12.dp))
|
||||
}
|
||||
Text(
|
||||
text = title,
|
||||
maxLines = 1
|
||||
)
|
||||
Text(text = title, maxLines = 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user