Skip to content

Commit

Permalink
app: ui: Multiselect show counter of how many is selected
Browse files Browse the repository at this point in the history
  • Loading branch information
mikooomich committed Jun 5, 2024
1 parent 655d255 commit f020560
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,10 @@ fun AlbumScreen(
) {
if (selection) {
val count = wrappedSongs?.count { it.isSelected }
Text(text = "$count elements selected", modifier = Modifier.weight(1f))
Text(
text = "${count}/${wrappedSongs?.size} selected",
modifier = Modifier.weight(1f)
)
IconButton(
onClick = {
if (count == wrappedSongs?.size) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ fun LibrarySongsFolderScreen(
) {
if (selection) {
val count = wrappedSongs.count { it.isSelected }
Text(text = "$count elements selected", modifier = Modifier.weight(1f))
Text(
text = "${count}/${wrappedSongs.size} selected",
modifier = Modifier.weight(1f)
)
IconButton(
onClick = {
if (count == wrappedSongs.size) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,10 @@ fun LibrarySongsScreen(
) {
if (selection) {
val count = wrappedSongs.count { it.isSelected }
Text(text = "$count elements selected", modifier = Modifier.weight(1f))
Text(
text = "${count}/${wrappedSongs.size} selected",
modifier = Modifier.weight(1f)
)
IconButton(
onClick = {
if (count == wrappedSongs.size) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,10 @@ fun AutoPlaylistScreen(
) {
if (selection) {
val count = wrappedSongs?.count { it.isSelected }
Text(text = "$count elements selected", modifier = Modifier.weight(1f))
Text(
text = "${count}/${wrappedSongs.size} selected",
modifier = Modifier.weight(1f)
)
IconButton(
onClick = {
if (count == wrappedSongs?.size) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,10 @@ fun LocalPlaylistScreen(

if (selection) {
val count = wrappedSongs.count { it.isSelected }
Text(text = "$count elements selected", modifier = Modifier.weight(1f))
Text(
text = "${count}/${wrappedSongs.size} selected",
modifier = Modifier.weight(1f)
)
IconButton(
onClick = {
if (count == wrappedSongs.size) {
Expand Down

0 comments on commit f020560

Please sign in to comment.