Fix empty state text for inbox search

This commit is contained in:
Moez Bhatti
2018-04-09 03:01:03 -04:00
parent 223d789f5f
commit a9f6f39e59
2 changed files with 6 additions and 2 deletions
@@ -142,7 +142,7 @@ class MainActivity : QkThemedActivity<MainViewModel>(), MainView {
// Set the FAB compose icon color // Set the FAB compose icon color
colors.textPrimaryOnTheme colors.textPrimaryOnTheme
.doOnNext { color -> compose.setTint(color) } .doOnNext { color -> compose.setTint(color) }
.doOnNext { color -> itemTouchCallback.iconColor = color} .doOnNext { color -> itemTouchCallback.iconColor = color }
.autoDisposable(scope()) .autoDisposable(scope())
.subscribe() .subscribe()
@@ -195,7 +195,10 @@ class MainActivity : QkThemedActivity<MainViewModel>(), MainView {
conversationsAdapter.flowable = state.page.data conversationsAdapter.flowable = state.page.data
itemTouchHelper.attachToRecyclerView(recyclerView) itemTouchHelper.attachToRecyclerView(recyclerView)
menuItemAdapter.data = state.page.menu menuItemAdapter.data = state.page.menu
empty.setText(R.string.inbox_empty_text) empty.setText(when (state.page.showClearButton) {
true -> R.string.inbox_search_empty_text
false -> R.string.inbox_empty_text
})
compose.setVisible(true) compose.setVisible(true)
} }
@@ -59,6 +59,7 @@
<string name="drawer_help">Help &amp; feedback</string> <string name="drawer_help">Help &amp; feedback</string>
<string name="inbox_empty_text">Your conversations will appear here</string> <string name="inbox_empty_text">Your conversations will appear here</string>
<string name="inbox_search_empty_text">No results</string>
<string name="archived_empty_text">Your archived conversations will appear here</string> <string name="archived_empty_text">Your archived conversations will appear here</string>
<string name="scheduled_empty_text">Your scheduled messages will appear here</string> <string name="scheduled_empty_text">Your scheduled messages will appear here</string>