mirror of
https://github.com/mihonapp/mihon.git
synced 2024-11-29 12:13:22 -05:00
Update reset viewer flags strings
This commit is contained in:
parent
08fb2fe467
commit
5dc688dc2e
3 changed files with 10 additions and 12 deletions
|
@ -3,7 +3,7 @@ package eu.kanade.domain.manga.interactor
|
||||||
import eu.kanade.domain.manga.repository.MangaRepository
|
import eu.kanade.domain.manga.repository.MangaRepository
|
||||||
|
|
||||||
class ResetViewerFlags(
|
class ResetViewerFlags(
|
||||||
private val mangaRepository: MangaRepository
|
private val mangaRepository: MangaRepository,
|
||||||
) {
|
) {
|
||||||
suspend fun await(): Boolean {
|
suspend fun await(): Boolean {
|
||||||
return mangaRepository.resetViewerFlags()
|
return mangaRepository.resetViewerFlags()
|
||||||
|
|
|
@ -25,7 +25,6 @@ import eu.kanade.tachiyomi.ui.base.controller.pushController
|
||||||
import eu.kanade.tachiyomi.ui.setting.database.ClearDatabaseController
|
import eu.kanade.tachiyomi.ui.setting.database.ClearDatabaseController
|
||||||
import eu.kanade.tachiyomi.util.CrashLogUtil
|
import eu.kanade.tachiyomi.util.CrashLogUtil
|
||||||
import eu.kanade.tachiyomi.util.lang.launchIO
|
import eu.kanade.tachiyomi.util.lang.launchIO
|
||||||
import eu.kanade.tachiyomi.util.lang.withIOContext
|
|
||||||
import eu.kanade.tachiyomi.util.lang.withUIContext
|
import eu.kanade.tachiyomi.util.lang.withUIContext
|
||||||
import eu.kanade.tachiyomi.util.preference.bindTo
|
import eu.kanade.tachiyomi.util.preference.bindTo
|
||||||
import eu.kanade.tachiyomi.util.preference.defaultValue
|
import eu.kanade.tachiyomi.util.preference.defaultValue
|
||||||
|
@ -46,7 +45,6 @@ import eu.kanade.tachiyomi.util.system.logcat
|
||||||
import eu.kanade.tachiyomi.util.system.powerManager
|
import eu.kanade.tachiyomi.util.system.powerManager
|
||||||
import eu.kanade.tachiyomi.util.system.setDefaultSettings
|
import eu.kanade.tachiyomi.util.system.setDefaultSettings
|
||||||
import eu.kanade.tachiyomi.util.system.toast
|
import eu.kanade.tachiyomi.util.system.toast
|
||||||
import kotlinx.coroutines.runBlocking
|
|
||||||
import logcat.LogPriority
|
import logcat.LogPriority
|
||||||
import rikka.sui.Sui
|
import rikka.sui.Sui
|
||||||
import uy.kohesive.injekt.Injekt
|
import uy.kohesive.injekt.Injekt
|
||||||
|
@ -56,7 +54,7 @@ import java.io.File
|
||||||
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
import eu.kanade.tachiyomi.data.preference.PreferenceKeys as Keys
|
||||||
|
|
||||||
class SettingsAdvancedController(
|
class SettingsAdvancedController(
|
||||||
private val mangaRepository: MangaRepository = Injekt.get()
|
private val mangaRepository: MangaRepository = Injekt.get(),
|
||||||
) : SettingsController() {
|
) : SettingsController() {
|
||||||
|
|
||||||
private val network: NetworkHelper by injectLazy()
|
private val network: NetworkHelper by injectLazy()
|
||||||
|
@ -325,14 +323,14 @@ class SettingsAdvancedController(
|
||||||
private fun resetViewerFlags() {
|
private fun resetViewerFlags() {
|
||||||
val activity = activity ?: return
|
val activity = activity ?: return
|
||||||
launchIO {
|
launchIO {
|
||||||
val isSuccesful = mangaRepository.resetViewerFlags()
|
val success = mangaRepository.resetViewerFlags()
|
||||||
withUIContext {
|
withUIContext {
|
||||||
val resouurceString = if (isSuccesful) {
|
val message = if (success) {
|
||||||
R.string.pref_reset_viewer_flags_succesful
|
R.string.pref_reset_viewer_flags_success
|
||||||
} else {
|
} else {
|
||||||
R.string.pref_reset_viewer_flags_unsuccesful
|
R.string.pref_reset_viewer_flags_error
|
||||||
}
|
}
|
||||||
activity.toast(resouurceString)
|
activity.toast(message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -486,10 +486,10 @@
|
||||||
<string name="pref_refresh_library_covers">Refresh library manga covers</string>
|
<string name="pref_refresh_library_covers">Refresh library manga covers</string>
|
||||||
<string name="pref_refresh_library_tracking">Refresh tracking</string>
|
<string name="pref_refresh_library_tracking">Refresh tracking</string>
|
||||||
<string name="pref_refresh_library_tracking_summary">Updates status, score and last chapter read from the tracking services</string>
|
<string name="pref_refresh_library_tracking_summary">Updates status, score and last chapter read from the tracking services</string>
|
||||||
<string name="pref_reset_viewer_flags">Reset Viewer Flags</string>
|
<string name="pref_reset_viewer_flags">Reset viewer flags</string>
|
||||||
<string name="pref_reset_viewer_flags_summary">Resets reading mode and orientation of all series</string>
|
<string name="pref_reset_viewer_flags_summary">Resets reading mode and orientation of all series</string>
|
||||||
<string name="pref_reset_viewer_flags_succesful">Viewer flags reset was succesful</string>
|
<string name="pref_reset_viewer_flags_success">Viewer flags reset</string>
|
||||||
<string name="pref_reset_viewer_flags_unsuccesful">Couldn\'t reset viewer flags</string>
|
<string name="pref_reset_viewer_flags_error">Couldn\'t reset viewer flags</string>
|
||||||
<string name="pref_dump_crash_logs">Dump crash logs</string>
|
<string name="pref_dump_crash_logs">Dump crash logs</string>
|
||||||
<string name="pref_dump_crash_logs_summary">Saves error logs to a file for sharing with the developers</string>
|
<string name="pref_dump_crash_logs_summary">Saves error logs to a file for sharing with the developers</string>
|
||||||
<string name="crash_log_saved">Crash logs saved</string>
|
<string name="crash_log_saved">Crash logs saved</string>
|
||||||
|
|
Loading…
Reference in a new issue