fix: 修复目录界面右上角菜单替换规则和字数统计切换无效
This commit is contained in:
@@ -152,8 +152,8 @@ fun TocScreen(
|
||||
|
||||
var editingBookmark by remember { mutableStateOf<Bookmark?>(null) }
|
||||
|
||||
val useReplace = viewModel.useReplace
|
||||
val showWordCount = viewModel.showWordCount
|
||||
val useReplace = state.useReplace
|
||||
val showWordCount = state.showWordCount
|
||||
val bookmarkManagementTitle = stringResource(R.string.bookmark_management)
|
||||
val locateCurrentReadingText = stringResource(R.string.locate_current_reading)
|
||||
val moveToTopText = stringResource(R.string.move_to_top)
|
||||
@@ -686,7 +686,7 @@ fun ChapterListContent(
|
||||
.animateItem()
|
||||
.fillMaxWidth(),
|
||||
item = uiItem,
|
||||
showWordCount = viewModel.showWordCount,
|
||||
showWordCount = state.showWordCount,
|
||||
onClick = {
|
||||
if (state.selectedIds.isNotEmpty())
|
||||
viewModel.toggleSelection(uiItem.id)
|
||||
|
||||
@@ -80,7 +80,9 @@ data class TocActionState(
|
||||
override val searchKey: String = "",
|
||||
override val isSearch: Boolean = false,
|
||||
override val isLoading: Boolean = false,
|
||||
val downloadSummary: String = ""
|
||||
val downloadSummary: String = "",
|
||||
val useReplace: Boolean = false,
|
||||
val showWordCount: Boolean = true,
|
||||
) : ListUiState<TocItemUi>
|
||||
|
||||
data class TocDomainItem(
|
||||
@@ -347,7 +349,9 @@ class TocViewModel(
|
||||
searchKey = _searchKey.value,
|
||||
isSearch = isSearch,
|
||||
isLoading = isUploading,
|
||||
downloadSummary = downloadSummary.value
|
||||
downloadSummary = downloadSummary.value,
|
||||
useReplace = tocPreferences.value.useReplace,
|
||||
showWordCount = tocPreferences.value.showWordCount,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user