Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default thumbnail mode to square instead of rectangular #117

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ interface PrefsRepo {
VIEW_STYLE_TEXT_LIST
)

const val BOOK_COVER_STYLE_RECT = "Rectangular"
const val BOOK_COVER_STYLE_SQUARE = "Square"
const val BOOK_COVER_STYLE_RECT = "Rectangular"
}
}

Expand Down Expand Up @@ -186,7 +186,7 @@ class SharedPreferencesPrefsRepo @Inject constructor(private val sharedPreferenc
value.absolutePath
).apply()

private val defaultBookCoverStyle = "Rectangular"
private val defaultBookCoverStyle = "Square"
override var bookCoverStyle: String
get() = getString(KEY_BOOK_COVER_STYLE, defaultBookCoverStyle)
set(value) = sharedPreferences.edit().putString(KEY_BOOK_COVER_STYLE, value).apply()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -599,10 +599,12 @@ class CurrentlyPlayingViewModel(
}
R.string.sleep_timer_duration_end_of_chapter -> {
val duration = (
((chapterDuration.value ?: 0L) - (
chapterProgress.value
?: 0L
)) / prefsRepo.playbackSpeed
(
(chapterDuration.value ?: 0L) - (
chapterProgress.value
?: 0L
)
) / prefsRepo.playbackSpeed
).toLong()
BEGIN to duration
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ class SettingsViewModel(
override fun onClick() {
showOptionsMenu(
options = listOf(
FormattableString.from(R.string.settings_book_cover_type_rect),
FormattableString.from(R.string.settings_book_cover_type_square)
FormattableString.from(R.string.settings_book_cover_type_square),
FormattableString.from(R.string.settings_book_cover_type_rect)
),
title = FormattableString.from(R.string.settings_book_cover_type_label),
listener = object : BottomChooserItemListener() {
Expand Down