diff --git a/app/src/main/java/com/amaze/filemanager/ui/views/appbar/AppBar.kt b/app/src/main/java/com/amaze/filemanager/ui/views/appbar/AppBar.kt index 55a55da2b2..c6112729af 100644 --- a/app/src/main/java/com/amaze/filemanager/ui/views/appbar/AppBar.kt +++ b/app/src/main/java/com/amaze/filemanager/ui/views/appbar/AppBar.kt @@ -57,10 +57,16 @@ class AppBar( } } + /** + * Sets the app title, or sets it as empty if null is passed + */ fun setTitle(title: String?) { toolbar.title = title } + /** + * Sets the app title + */ fun setTitle(@StringRes title: Int) { toolbar.setTitle(title) } diff --git a/app/src/main/java/com/amaze/filemanager/ui/views/appbar/SearchView.kt b/app/src/main/java/com/amaze/filemanager/ui/views/appbar/SearchView.kt index f6b7f50590..6582f9b321 100644 --- a/app/src/main/java/com/amaze/filemanager/ui/views/appbar/SearchView.kt +++ b/app/src/main/java/com/amaze/filemanager/ui/views/appbar/SearchView.kt @@ -52,7 +52,8 @@ class SearchView( init { searchView.setOnSearchListener(object : OnSearchListener { - override fun onSuggestionClicked(searchSuggestion: SearchSuggestion) {} + override fun onSuggestionClicked(searchSuggestion: SearchSuggestion) = Unit + override fun onSearchAction(currentQuery: String) { onSearch(currentQuery) hideSearchView()