Skip to content

Commit

Permalink
- removes the current category from fab menus
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo03v committed Apr 13, 2024
1 parent 83a8808 commit bcb7f84
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,9 @@ fun OverloadNavigationFab(
}
}

categoryState.categories.forEach { category ->
categoryState.categories.filter {
categoryState.selectedCategory != it.id
}.forEach { category ->
SmallFloatingActionButton(
onClick = {
categoryEvent(CategoryEvent.SetSelectedCategory(category.id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,9 @@ fun OverloadNavigationFabSmall(
)
}

categoryState.categories.forEach { category ->
categoryState.categories.filter {
categoryState.selectedCategory != it.id
}.forEach { category ->
SmallFloatingActionButton(
onClick = {
categoryEvent(CategoryEvent.SetSelectedCategory(category.id))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ fun ConfigurationsTab(
ConfigurationsTabItem(title = stringResource(id = R.string.categories))
}

categoryState.categories.forEach { category ->
categoryState.categories.filter {
categoryState.selectedCategory != it.id
}.forEach { category ->
item {
ConfigurationsTabItem(
title = category.emoji + " " + category.name,
Expand Down

0 comments on commit bcb7f84

Please sign in to comment.