mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2025-01-11 11:19:09 +01:00
Format fixes for reader activity
This commit is contained in:
parent
70105110b5
commit
36ade17ba7
@ -558,8 +558,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||||||
// Set seekbar page number
|
// Set seekbar page number
|
||||||
page_text.text = "${page.number} / ${pages.size}"
|
page_text.text = "${page.number} / ${pages.size}"
|
||||||
|
|
||||||
if (!newChapter && chapters_bottom_sheet.shouldCollapse && chapters_bottom_sheet
|
if (!newChapter && chapters_bottom_sheet.shouldCollapse && chapters_bottom_sheet.sheetBehavior.isExpanded()) {
|
||||||
.sheetBehavior.isExpanded()) {
|
|
||||||
chapters_bottom_sheet.sheetBehavior?.collapse()
|
chapters_bottom_sheet.sheetBehavior?.collapse()
|
||||||
}
|
}
|
||||||
if (chapters_bottom_sheet.selectedChapterId != page.chapter.chapter.id) {
|
if (chapters_bottom_sheet.selectedChapterId != page.chapter.chapter.id) {
|
||||||
@ -580,11 +579,9 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||||||
val items = listOf(
|
val items = listOf(
|
||||||
MaterialMenuSheet.MenuSheetItem(
|
MaterialMenuSheet.MenuSheetItem(
|
||||||
0, R.drawable.ic_photo_24dp, R.string.set_as_cover
|
0, R.drawable.ic_photo_24dp, R.string.set_as_cover
|
||||||
),
|
), MaterialMenuSheet.MenuSheetItem(
|
||||||
MaterialMenuSheet.MenuSheetItem(
|
|
||||||
1, R.drawable.ic_share_24dp, R.string.share
|
1, R.drawable.ic_share_24dp, R.string.share
|
||||||
),
|
), MaterialMenuSheet.MenuSheetItem(
|
||||||
MaterialMenuSheet.MenuSheetItem(
|
|
||||||
2, R.drawable.ic_save_24dp, R.string.save
|
2, R.drawable.ic_save_24dp, R.string.save
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -637,13 +634,10 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||||||
fun showSetCoverPrompt(page: ReaderPage) {
|
fun showSetCoverPrompt(page: ReaderPage) {
|
||||||
if (page.status != Page.READY) return
|
if (page.status != Page.READY) return
|
||||||
|
|
||||||
MaterialDialog(this)
|
MaterialDialog(this).title(R.string.use_image_as_cover)
|
||||||
.title(R.string.use_image_as_cover)
|
|
||||||
.positiveButton(android.R.string.yes) {
|
.positiveButton(android.R.string.yes) {
|
||||||
setAsCover(page)
|
setAsCover(page)
|
||||||
}
|
}.negativeButton(android.R.string.no).show()
|
||||||
.negativeButton(android.R.string.no)
|
|
||||||
.show()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -658,8 +652,7 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||||||
DecimalFormat("#.###", DecimalFormatSymbols().apply { decimalSeparator = '.' })
|
DecimalFormat("#.###", DecimalFormatSymbols().apply { decimalSeparator = '.' })
|
||||||
|
|
||||||
val text = "${manga.title}: ${getString(
|
val text = "${manga.title}: ${getString(
|
||||||
R.string.chapter_,
|
R.string.chapter_, decimalFormat.format(chapter.chapter_number)
|
||||||
decimalFormat.format(chapter.chapter_number)
|
|
||||||
)}, ${getString(R.string.page_, page.number)}"
|
)}, ${getString(R.string.page_, page.number)}"
|
||||||
|
|
||||||
val stream = file.getUriCompat(this)
|
val stream = file.getUriCompat(this)
|
||||||
@ -729,7 +722,8 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>(),
|
|||||||
setMenuVisibility(false)
|
setMenuVisibility(false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sheetManageNavColor) window.navigationBarColor = getResourceColor(R.attr.colorSecondary)
|
if (sheetManageNavColor) window.navigationBarColor =
|
||||||
|
getResourceColor(R.attr.colorSecondary)
|
||||||
reader_menu.visible()
|
reader_menu.visible()
|
||||||
val toolbarAnimation = AnimationUtils.loadAnimation(this, R.anim.enter_from_top)
|
val toolbarAnimation = AnimationUtils.loadAnimation(this, R.anim.enter_from_top)
|
||||||
toolbarAnimation.setAnimationListener(object : SimpleAnimationListener() {
|
toolbarAnimation.setAnimationListener(object : SimpleAnimationListener() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user