For #2425 - QAB showed wrong text for bookmarked pages (#3794)

* For #2425 - QAB showed wrong text for bookmarked pages

* fixed linting issue
nightly-build-test
Sören Hentzschel 5 years ago committed by Colin Lee
parent 7e46e71d00
commit eb1ea882cf

@ -103,6 +103,7 @@ class QuickActionUIView(
}
}
@Suppress("ComplexMethod")
override fun updateView() = Consumer<QuickActionState> {
view.quick_action_read.apply {
visibility = if (it.readable) View.VISIBLE else View.GONE
@ -121,6 +122,12 @@ class QuickActionUIView(
view.quick_action_read_appearance.visibility = if (it.readerActive) View.VISIBLE else View.GONE
view.quick_action_bookmark.isSelected = it.bookmarked
view.quick_action_bookmark.text = if (it.bookmarked) {
view.context.getString(R.string.quick_action_bookmark_edit)
} else {
view.context.getString(R.string.quick_action_bookmark)
}
if (it.bounceNeeded && Settings.getInstance(view.context).shouldAutoBounceQuickActionSheet) {
quickActionSheet.bounceSheet()
}

@ -242,6 +242,8 @@
<string name="quick_action_download">Download</string>
<!-- Button in the browser chrome in the browser to bookmark the current page -->
<string name="quick_action_bookmark">Bookmark</string>
<!-- Button in the browser chrome in the browser to edit the bookmark of the current page -->
<string name="quick_action_bookmark_edit">Edit Bookmark</string>
<!-- Button in the browser chrome in the browser to put the the current page in reader mode -->
<string name="quick_action_read">Read</string>
<!-- Button in the browser chrome to exit reader mode -->

Loading…
Cancel
Save