Skip to content

Commit

Permalink
Bugs Amended
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyfromNandini committed Nov 26, 2023
1 parent 2c6ece2 commit 22237ce
Showing 1 changed file with 34 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ fun CollectWaste(
) {
val seconds by reportWasteViewModel.tagsSearch.collectAsState(initial = "")
val focusRequester = remember { FocusRequester() }
val isMapsSearchVisible = remember { mutableStateOf(true) }
val focusManager = LocalFocusManager.current
val screenWidth = LocalConfiguration.current.screenWidthDp.dp
var allWastes by remember { mutableStateOf<List<WasteItem>?>(null) }
Expand Down Expand Up @@ -214,18 +215,33 @@ fun CollectWaste(
fontSize = 25.sp
)
}
if (isMapsSearchVisible.value) {
Icon(
imageVector = Icons.Filled.Search,
contentDescription = "",
tint = textColor,
modifier = Modifier
.padding(end = 20.dp)
.size(25.dp)
.clickable {
isSearchVisible = !isSearchVisible
}

Icon(
imageVector = Icons.Filled.Search,
contentDescription = "",
tint = textColor,
modifier = Modifier
.padding(end = 20.dp)
.size(25.dp)
.clickable {
isSearchVisible = !isSearchVisible
}
)
)
} else {
Icon(
imageVector = Icons.Filled.Close,
contentDescription = "",
tint = textColor,
modifier = Modifier
.padding(end = 20.dp)
.size(25.dp)
.clickable {
isSearchVisible = !isSearchVisible
}

)
}


}
Expand Down Expand Up @@ -344,6 +360,13 @@ fun CollectWaste(
}

}
LaunchedEffect(key1 = tabIndex){
if (tabIndex == 0) {
isMapsSearchVisible.value = true
} else {
isMapsSearchVisible.value = false
}
}
if (tabIndex == 0) {
Spacer(modifier = Modifier.height(30.dp))
if (allWastes != null) {
Expand Down

0 comments on commit 22237ce

Please sign in to comment.