From a9f6f39e598740d519b28b4c9ceccd08db6dc362 Mon Sep 17 00:00:00 2001 From: Moez Bhatti Date: Mon, 9 Apr 2018 03:01:03 -0400 Subject: [PATCH] Fix empty state text for inbox search --- presentation/src/main/java/feature/main/MainActivity.kt | 7 +++++-- presentation/src/main/res/values/strings.xml | 1 + 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/presentation/src/main/java/feature/main/MainActivity.kt b/presentation/src/main/java/feature/main/MainActivity.kt index 9919445b..2f194de2 100644 --- a/presentation/src/main/java/feature/main/MainActivity.kt +++ b/presentation/src/main/java/feature/main/MainActivity.kt @@ -142,7 +142,7 @@ class MainActivity : QkThemedActivity(), MainView { // Set the FAB compose icon color colors.textPrimaryOnTheme .doOnNext { color -> compose.setTint(color) } - .doOnNext { color -> itemTouchCallback.iconColor = color} + .doOnNext { color -> itemTouchCallback.iconColor = color } .autoDisposable(scope()) .subscribe() @@ -195,7 +195,10 @@ class MainActivity : QkThemedActivity(), MainView { conversationsAdapter.flowable = state.page.data itemTouchHelper.attachToRecyclerView(recyclerView) 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) } diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index c06b0ca2..3b35cb6b 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -59,6 +59,7 @@ Help & feedback Your conversations will appear here + No results Your archived conversations will appear here Your scheduled messages will appear here