Added Last Used header to browse
This commit is contained in:
parent
8c1ec43500
commit
a088c9ca7c
4 changed files with 4 additions and 0 deletions
|
@ -240,6 +240,7 @@ class SourceController : NucleusController<SourceMainControllerBinding, SourcePr
|
||||||
adapter?.removeAllScrollableHeaders()
|
adapter?.removeAllScrollableHeaders()
|
||||||
if (item != null) {
|
if (item != null) {
|
||||||
adapter?.addScrollableHeader(item)
|
adapter?.addScrollableHeader(item)
|
||||||
|
adapter?.addScrollableHeader(LangItem(SourcePresenter.LAST_USED_KEY))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -113,5 +113,6 @@ class SourcePresenter(
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val PINNED_KEY = "pinned"
|
const val PINNED_KEY = "pinned"
|
||||||
|
const val LAST_USED_KEY = "last_used"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,7 @@ object LocaleHelper {
|
||||||
fun getSourceDisplayName(lang: String?, context: Context): String {
|
fun getSourceDisplayName(lang: String?, context: Context): String {
|
||||||
return when (lang) {
|
return when (lang) {
|
||||||
"" -> context.getString(R.string.other_source)
|
"" -> context.getString(R.string.other_source)
|
||||||
|
SourcePresenter.LAST_USED_KEY -> context.getString(R.string.last_used_source)
|
||||||
SourcePresenter.PINNED_KEY -> context.getString(R.string.pinned_sources)
|
SourcePresenter.PINNED_KEY -> context.getString(R.string.pinned_sources)
|
||||||
"all" -> context.getString(R.string.all_lang)
|
"all" -> context.getString(R.string.all_lang)
|
||||||
else -> getDisplayName(lang)
|
else -> getDisplayName(lang)
|
||||||
|
|
|
@ -395,6 +395,7 @@
|
||||||
<string name="http_error_hint">Check website in WebView</string>
|
<string name="http_error_hint">Check website in WebView</string>
|
||||||
<string name="local_source">Local source</string>
|
<string name="local_source">Local source</string>
|
||||||
<string name="other_source">Other</string>
|
<string name="other_source">Other</string>
|
||||||
|
<string name="last_used_source">Last used</string>
|
||||||
<string name="pinned_sources">Pinned</string>
|
<string name="pinned_sources">Pinned</string>
|
||||||
<string name="invalid_combination">Default can\'t be selected with other categories</string>
|
<string name="invalid_combination">Default can\'t be selected with other categories</string>
|
||||||
<string name="added_to_library">The manga has been added to your library</string>
|
<string name="added_to_library">The manga has been added to your library</string>
|
||||||
|
|
Reference in a new issue