Fix some lint issues

Signed-off-by: Álvaro Brey <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey 2022-05-30 16:12:28 +02:00
parent 232334efac
commit c10c45630c
No known key found for this signature in database
GPG Key ID: 2585783189A62105
4 changed files with 12 additions and 8 deletions

View File

@ -174,8 +174,7 @@
<activity <activity
android:name=".messagesearch.MessageSearchActivity" android:name=".messagesearch.MessageSearchActivity"
android:theme="@style/AppTheme" android:theme="@style/AppTheme" />
android:exported="false" />
<receiver android:name=".receivers.PackageReplacedReceiver"> <receiver android:name=".receivers.PackageReplacedReceiver">
<intent-filter> <intent-filter>

View File

@ -193,14 +193,14 @@ class MessageSearchActivity : BaseActivity() {
private fun showInitial() { private fun showInitial() {
displayLoading(false) displayLoading(false)
binding.messageSearchRecycler.visibility = View.GONE binding.messageSearchRecycler.visibility = View.GONE
binding.emptyContainer.emptyListViewHeadline.text = "Start typing to search..." binding.emptyContainer.emptyListViewHeadline.text = getString(R.string.message_search_begin_typing)
binding.emptyContainer.emptyListView.visibility = View.VISIBLE binding.emptyContainer.emptyListView.visibility = View.VISIBLE
} }
private fun showEmpty() { private fun showEmpty() {
displayLoading(false) displayLoading(false)
binding.messageSearchRecycler.visibility = View.GONE binding.messageSearchRecycler.visibility = View.GONE
binding.emptyContainer.emptyListViewHeadline.text = "No search results" binding.emptyContainer.emptyListViewHeadline.text = getString(R.string.message_search_begin_empty)
binding.emptyContainer.emptyListView.visibility = View.VISIBLE binding.emptyContainer.emptyListView.visibility = View.VISIBLE
} }
@ -229,7 +229,7 @@ class MessageSearchActivity : BaseActivity() {
} }
private fun setupSearchView() { private fun setupSearchView() {
searchView.queryHint = getString(R.string.nc_search_hint) searchView.queryHint = getString(R.string.message_search_hint)
searchViewDisposable = observeSearchView(searchView) searchViewDisposable = observeSearchView(searchView)
.debounce { query -> .debounce { query ->
when { when {

View File

@ -24,6 +24,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/bg_default" android:background="@color/bg_default"
tools:ignore="Overdraw"
tools:context=".messagesearch.MessageSearchActivity"> tools:context=".messagesearch.MessageSearchActivity">
<com.google.android.material.appbar.AppBarLayout <com.google.android.material.appbar.AppBarLayout

View File

@ -518,13 +518,17 @@
<string name="shared_items_voice">Voice</string> <string name="shared_items_voice">Voice</string>
<string name="shared_items_other">Other</string> <string name="shared_items_other">Other</string>
<!-- Message search -->
<string name="messages">Messages</string>
<string name="load_more_results">Load more results</string>
<string name="message_search_hint">Search…</string>
<string name="message_search_begin_typing">Start typing to search…</string>
<string name="message_search_begin_empty">No search results</string>
<string name="title_attachments">Attachments</string> <string name="title_attachments">Attachments</string>
<string name="reactions_tab_all">All</string> <string name="reactions_tab_all">All</string>
<string name="send_without_notification">Send without notification</string> <string name="send_without_notification">Send without notification</string>
<string name="call_without_notification">Call without notification</string> <string name="call_without_notification">Call without notification</string>
<string name="messages">Messages</string>
<string name="load_more_results">Load more results</string>
<string name="nc_search_hint">Search…</string>
</resources> </resources>