Skip to content

Commit

Permalink
[fix]disable page indicator in ActionRow
Browse files Browse the repository at this point in the history
[fix]save state when delbuttonlongclick
  • Loading branch information
Steve-Mr committed Oct 4, 2024
1 parent 3d2ec11 commit 6c4dd88
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions app/src/main/java/top/maary/oblivionis/ui/ActionComponents.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package top.maary.oblivionis.ui

import android.net.Uri
import android.provider.MediaStore
import android.util.Log
import androidx.compose.foundation.ExperimentalFoundationApi
import androidx.compose.foundation.clickable
import androidx.compose.foundation.combinedClickable
Expand Down Expand Up @@ -221,14 +222,14 @@ fun ActionRow(
) {
OutlinedButton(
onClick = {},
modifier = Modifier
.height(48.dp)
modifier = Modifier.height(48.dp),
enabled = (pagesCount != 0)
) {
Text(
modifier = Modifier.padding(start = 8.dp, end = 32.dp),
text = stringResource(R.string.pager_count, currentPage, pagesCount)
text = stringResource(R.string.pager_count,
if (pagesCount == 0) 0 else currentPage, pagesCount)
)

}
if (loading) {
LinearProgressIndicator(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ class ActionViewModel(
private fun databaseMarkAll(images: List<MediaStoreImage>) = viewModelScope.launch {
images.forEach {
if (it.isExcluded) return@forEach
imageRepository.mark(it.copy(isMarked = false))
imageRepository.mark(it.copy(isMarked = true))
}
}

Expand Down

0 comments on commit 6c4dd88

Please sign in to comment.