mirror of
https://github.com/gedoor/legado.git
synced 2024-07-19 01:17:25 +08:00
commit
8e74ee85d9
@ -150,7 +150,7 @@ class ReadMenu @JvmOverloads constructor(
|
||||
bindEvent()
|
||||
}
|
||||
|
||||
private fun initView() = binding.run {
|
||||
private fun initView(reset: Boolean = false) = binding.run {
|
||||
if (AppConfig.isNightTheme) {
|
||||
fabNightTheme.setImageResource(R.drawable.ic_daytime)
|
||||
} else {
|
||||
@ -164,7 +164,7 @@ class ReadMenu @JvmOverloads constructor(
|
||||
titleBar.setColorFilter(textColor)
|
||||
tvChapterName.setTextColor(lightTextColor)
|
||||
tvChapterUrl.setTextColor(lightTextColor)
|
||||
} else {
|
||||
} else if (reset) {
|
||||
val bgColor = context.primaryColor
|
||||
val textColor = context.primaryTextColor
|
||||
titleBar.setTextColor(textColor)
|
||||
@ -210,7 +210,7 @@ class ReadMenu @JvmOverloads constructor(
|
||||
|
||||
fun reset() {
|
||||
upColorConfig()
|
||||
initView()
|
||||
initView(true)
|
||||
}
|
||||
|
||||
fun refreshMenuColorFilter() {
|
||||
|
@ -77,6 +77,7 @@ class SearchViewModel(application: Application) : BaseViewModel(application) {
|
||||
execute {
|
||||
appDb.searchKeywordDao.get(key)?.let {
|
||||
it.usage = it.usage + 1
|
||||
it.lastUseTime = System.currentTimeMillis()
|
||||
appDb.searchKeywordDao.update(it)
|
||||
} ?: appDb.searchKeywordDao.insert(SearchKeyword(key, 1))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user