mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-21 12:39:58 +01:00
Cleanups
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
0857938d94
commit
818d15dbec
@ -110,7 +110,6 @@ abstract class BaseController : ButterKnifeController(), ComponentCallbacks {
|
||||
if (it is MainActivity) {
|
||||
it.searchCardView?.isVisible = value
|
||||
it.floatingActionButton?.isVisible = value
|
||||
it.inputEditText?.hint = getSearchHint()
|
||||
|
||||
val layoutParams = it.toolbar.layoutParams as AppBarLayout.LayoutParams
|
||||
|
||||
@ -178,8 +177,10 @@ abstract class BaseController : ButterKnifeController(), ComponentCallbacks {
|
||||
|
||||
val title = getTitle()
|
||||
val actionBar = actionBar
|
||||
if (title != null && actionBar != null) {
|
||||
if (title != null && actionBar != null && !getIsUsingSearchLayout()) {
|
||||
actionBar.title = title
|
||||
} else if (title != null && activity is MainActivity) {
|
||||
activity?.inputEditText?.hint = title
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,5 +216,4 @@ abstract class BaseController : ButterKnifeController(), ComponentCallbacks {
|
||||
}
|
||||
|
||||
open fun getIsUsingSearchLayout(): Boolean = false
|
||||
open fun getSearchHint(): String? = null
|
||||
}
|
||||
|
@ -291,12 +291,8 @@ class ConversationsListView : BaseView() {
|
||||
return true
|
||||
}
|
||||
|
||||
override fun getSearchHint(): String? {
|
||||
return resources?.getString(R.string.nc_search_conversations)
|
||||
}
|
||||
|
||||
override fun getTitle(): String? {
|
||||
return resources?.getString(R.string.nc_app_name)
|
||||
return resources?.getString(R.string.nc_search_conversations)
|
||||
}
|
||||
|
||||
override fun onRestoreViewState(view: View, savedViewState: Bundle) {
|
||||
|
Loading…
Reference in New Issue
Block a user