Skip to content

Commit

Permalink
Add clear filters
Browse files Browse the repository at this point in the history
  • Loading branch information
jsixface committed Apr 26, 2024
1 parent ff6e3f9 commit eef861e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions composeApp/src/commonMain/kotlin/ui/home/HomeScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.foundation.lazy.items
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Home
import androidx.compose.material.icons.rounded.ArrowDropDown
import androidx.compose.material.icons.rounded.Close
import androidx.compose.material.icons.rounded.Refresh
import androidx.compose.material.icons.rounded.Search
import androidx.compose.material3.*
Expand Down Expand Up @@ -144,6 +145,16 @@ object HomeScreen : Screen {
IconButton(modifier = sidePad, onClick = onRefresh) {
Icon(Icons.Rounded.Refresh, contentDescription = "Refresh")
}
// Clear filters
if (filteredName.isNotEmpty() || filteredAudioCodec.isNotEmpty() || filteredVideoCodec.isNotEmpty()) {
IconButton(onClick = {
filteredName = ""
filteredAudioCodec = ""
filteredVideoCodec = ""
}) {
Icon(Icons.Rounded.Close, contentDescription = "Clear filters")
}
}
}
Row(modifier = bottomPad.fillMaxSize()) {
LazyColumn {
Expand Down

0 comments on commit eef861e

Please sign in to comment.