Skip to content

Commit

Permalink
fix: Fix & rename swipe actions (#1094)
Browse files Browse the repository at this point in the history
  • Loading branch information
LuftVerbot authored Aug 2, 2023
1 parent 1f59519 commit 04aad93
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ object SettingsLibraryScreen : SearchableSettings {
title = stringResource(R.string.pref_chapter_swipe),
preferenceItems = listOf(
Preference.PreferenceItem.ListPreference(
pref = libraryPreferences.swipeChapterEndAction(),
title = stringResource(R.string.pref_chapter_swipe_end),
pref = libraryPreferences.swipeChapterStartAction(),
title = stringResource(R.string.pref_chapter_swipe_start),
entries = mapOf(
LibraryPreferences.ChapterSwipeAction.Disabled to stringResource(R.string.action_disable),
LibraryPreferences.ChapterSwipeAction.ToggleBookmark to stringResource(R.string.action_bookmark),
Expand All @@ -297,8 +297,8 @@ object SettingsLibraryScreen : SearchableSettings {
),
),
Preference.PreferenceItem.ListPreference(
pref = libraryPreferences.swipeChapterStartAction(),
title = stringResource(R.string.pref_chapter_swipe_start),
pref = libraryPreferences.swipeChapterEndAction(),
title = stringResource(R.string.pref_chapter_swipe_end),
entries = mapOf(
LibraryPreferences.ChapterSwipeAction.Disabled to stringResource(R.string.action_disable),
LibraryPreferences.ChapterSwipeAction.ToggleBookmark to stringResource(R.string.action_bookmark),
Expand All @@ -318,8 +318,8 @@ object SettingsLibraryScreen : SearchableSettings {
title = stringResource(R.string.pref_episode_swipe),
preferenceItems = listOf(
Preference.PreferenceItem.ListPreference(
pref = libraryPreferences.swipeEpisodeEndAction(),
title = stringResource(R.string.pref_episode_swipe_end),
pref = libraryPreferences.swipeEpisodeStartAction(),
title = stringResource(R.string.pref_episode_swipe_start),
entries = mapOf(
LibraryPreferences.EpisodeSwipeAction.Disabled to stringResource(R.string.action_disable),
LibraryPreferences.EpisodeSwipeAction.ToggleBookmark to stringResource(R.string.action_bookmark_episode),
Expand All @@ -329,7 +329,7 @@ object SettingsLibraryScreen : SearchableSettings {
),
Preference.PreferenceItem.ListPreference(
pref = libraryPreferences.swipeEpisodeEndAction(),
title = stringResource(R.string.pref_episode_swipe_start),
title = stringResource(R.string.pref_episode_swipe_end),
entries = mapOf(
LibraryPreferences.EpisodeSwipeAction.Disabled to stringResource(R.string.action_disable),
LibraryPreferences.EpisodeSwipeAction.ToggleBookmark to stringResource(R.string.action_bookmark_episode),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ class LibraryPreferences(

// region Swipe Actions

fun swipeEpisodeEndAction() = preferenceStore.getEnum("pref_episode_swipe_end_action", EpisodeSwipeAction.ToggleBookmark)
fun swipeEpisodeEndAction() = preferenceStore.getEnum("pref_episode_swipe_start_action", EpisodeSwipeAction.ToggleBookmark)

fun swipeEpisodeStartAction() = preferenceStore.getEnum("pref_episode_swipe_start_action", EpisodeSwipeAction.ToggleSeen)
fun swipeEpisodeStartAction() = preferenceStore.getEnum("pref_episode_swipe_end_action", EpisodeSwipeAction.ToggleSeen)

fun swipeChapterEndAction() = preferenceStore.getEnum("pref_chapter_swipe_end_action", ChapterSwipeAction.ToggleBookmark)
fun swipeChapterEndAction() = preferenceStore.getEnum("pref_chapter_swipe_start_action", ChapterSwipeAction.ToggleBookmark)

fun swipeChapterStartAction() = preferenceStore.getEnum("pref_chapter_swipe_start_action", ChapterSwipeAction.ToggleRead)
fun swipeChapterStartAction() = preferenceStore.getEnum("pref_chapter_swipe_end_action", ChapterSwipeAction.ToggleRead)

// endregion

Expand Down
4 changes: 2 additions & 2 deletions i18n/src/main/res/values/strings-aniyomi.xml
Original file line number Diff line number Diff line change
Expand Up @@ -294,8 +294,8 @@
<string name="action_save_screenshot">Save screenshot</string>

<string name="pref_episode_swipe">Episode swipe</string>
<string name="pref_episode_swipe_end">Swipe to end action</string>
<string name="pref_episode_swipe_start">Swipe to start action</string>
<string name="pref_episode_swipe_end">Swipe to right action</string>
<string name="pref_episode_swipe_start">Swipe to left action</string>
<!-- TachiyomiSY -->
<string name="data_saver_exclude">Exclude from data saver</string>
<string name="data_saver_stop_exclude">Stop excluding from data saver</string>
Expand Down
4 changes: 2 additions & 2 deletions i18n/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,8 @@
<string name="exclude">Exclude: %s</string>

<string name="pref_chapter_swipe">Chapter swipe</string>
<string name="pref_chapter_swipe_end">Swipe to end action</string>
<string name="pref_chapter_swipe_start">Swipe to start action</string>
<string name="pref_chapter_swipe_end">Swipe to right action</string>
<string name="pref_chapter_swipe_start">Swipe to left action</string>

<!-- Extension section -->
<string name="multi_lang">Multi</string>
Expand Down

0 comments on commit 04aad93

Please sign in to comment.