Skip to content
Snippets Groups Projects
Commit e7c1b0ca authored by Baryshnikov Oleg's avatar Baryshnikov Oleg
Browse files

Add the get character by id API method.

Add location and origin fields to the character info model.
Implement get character functions in repository and UI layers.
parent fb2b4114
No related branches found
No related tags found
No related merge requests found
......@@ -29,7 +29,7 @@ import cz.fel.barysole.ackeetesttask.ui.screen.screenWithTopAppBarList
@Composable
fun MyTopAppBar(
selectedScreen: Screen?,
snackbar: SnackbarHostState
onItemSelected: (id: Long) -> Unit
) {
if (screenWithTopAppBarList.contains(selectedScreen)) {
val isSearchBarShowing = rememberSaveable {
......@@ -38,7 +38,7 @@ fun MyTopAppBar(
// showing iff isSearchBarShowing is true
Crossfade(targetState = isSearchBarShowing.value) { showSearchBar ->
when (showSearchBar) {
true -> MySearchBar(isSearchBarShowing, snackbar)
true -> MySearchBar(isSearchBarShowing, onItemSelected)
false -> TopAppBar(
modifier = Modifier.shadow(16.dp),
title = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment