From f826b303e8c9c44e919bdcab92d91d3cd40d7921 Mon Sep 17 00:00:00 2001 From: kototo522 Date: Fri, 1 Mar 2024 21:52:39 +0900 Subject: [PATCH] =?UTF-8?q?chenge:=20=E3=83=95=E3=82=A9=E3=83=BC=E3=83=9E?= =?UTF-8?q?=E3=83=83=E3=83=88=E3=82=92=E6=95=B4=E3=81=88=E3=81=BE=E3=81=97?= =?UTF-8?q?=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/example/tsundokun/ui/search/SearchScreen.kt | 7 +++---- .../com/example/tsundokun/ui/search/SearchViewModel.kt | 4 +--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/app/src/main/java/com/example/tsundokun/ui/search/SearchScreen.kt b/app/src/main/java/com/example/tsundokun/ui/search/SearchScreen.kt index 9732b68..8c6f67d 100644 --- a/app/src/main/java/com/example/tsundokun/ui/search/SearchScreen.kt +++ b/app/src/main/java/com/example/tsundokun/ui/search/SearchScreen.kt @@ -45,12 +45,11 @@ fun SearchScreen(navigator: DestinationsNavigator) { var searchQuery by rememberSaveable { mutableStateOf(searchUiState.searchQuery) } var active by remember { mutableStateOf(false) } - Surface( modifier = Modifier.fillMaxSize(), color = MaterialTheme.colorScheme.background, ) { - Column{ + Column { SearchBar( query = searchQuery, onQueryChange = { newQuery -> searchQuery = newQuery }, @@ -70,7 +69,7 @@ fun SearchScreen(navigator: DestinationsNavigator) { Icon( imageVector = Filled.ArrowBack, contentDescription = stringResource(string.button_close), - modifier = Modifier.clickable { navigator.popBackStack() } + modifier = Modifier.clickable { navigator.popBackStack() }, ) }, trailingIcon = { @@ -88,4 +87,4 @@ fun SearchScreen(navigator: DestinationsNavigator) { ) } } -} \ No newline at end of file +} diff --git a/app/src/main/java/com/example/tsundokun/ui/search/SearchViewModel.kt b/app/src/main/java/com/example/tsundokun/ui/search/SearchViewModel.kt index cd53cf3..188292a 100644 --- a/app/src/main/java/com/example/tsundokun/ui/search/SearchViewModel.kt +++ b/app/src/main/java/com/example/tsundokun/ui/search/SearchViewModel.kt @@ -3,12 +3,10 @@ package com.example.tsundokun.ui.search import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.example.tsundokun.core.model.Tsundoku -import com.example.tsundokun.data.local.dao.TsundokuDao import com.example.tsundokun.data.repository.TsundokuRepository import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.asStateFlow -import kotlinx.coroutines.flow.filter import kotlinx.coroutines.flow.map import kotlinx.coroutines.launch import javax.inject.Inject @@ -42,4 +40,4 @@ class SearchViewModel @Inject constructor( var searchQuery: String = "", var searchResults: List = emptyList(), ) -} \ No newline at end of file +}