@@ -40,6 +40,7 @@ fun ChapterSettingsDialog(
|
||||
onSortModeChanged: (Long) -> Unit,
|
||||
onDisplayModeChanged: (Long) -> Unit,
|
||||
onSetAsDefault: (applyToExistingManga: Boolean) -> Unit,
|
||||
onResetToDefault: () -> Unit,
|
||||
) {
|
||||
var showSetAsDefaultDialog by rememberSaveable { mutableStateOf(false) }
|
||||
if (showSetAsDefaultDialog) {
|
||||
@@ -64,6 +65,13 @@ fun ChapterSettingsDialog(
|
||||
closeMenu()
|
||||
},
|
||||
)
|
||||
DropdownMenuItem(
|
||||
text = { Text(stringResource(R.string.action_reset)) },
|
||||
onClick = {
|
||||
onResetToDefault()
|
||||
closeMenu()
|
||||
},
|
||||
)
|
||||
},
|
||||
) { page ->
|
||||
Column(
|
||||
|
||||
@@ -59,7 +59,7 @@ import okhttp3.Headers
|
||||
import tachiyomi.core.util.lang.launchNonCancellable
|
||||
import tachiyomi.core.util.lang.withUIContext
|
||||
import tachiyomi.core.util.system.logcat
|
||||
import tachiyomi.domain.manga.repository.MangaRepository
|
||||
import tachiyomi.domain.manga.interactor.ResetViewerFlags
|
||||
import tachiyomi.presentation.core.util.collectAsState
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
@@ -309,7 +309,7 @@ object SettingsAdvancedScreen : SearchableSettings {
|
||||
subtitle = stringResource(R.string.pref_reset_viewer_flags_summary),
|
||||
onClick = {
|
||||
scope.launchNonCancellable {
|
||||
val success = Injekt.get<MangaRepository>().resetViewerFlags()
|
||||
val success = Injekt.get<ResetViewerFlags>().await()
|
||||
withUIContext {
|
||||
val message = if (success) {
|
||||
R.string.pref_reset_viewer_flags_success
|
||||
|
||||
Reference in New Issue
Block a user