aboutsummaryrefslogtreecommitdiff
path: root/sample/src
diff options
context:
space:
mode:
Diffstat (limited to 'sample/src')
-rw-r--r--sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt17
-rw-r--r--sample/src/main/res/xml/kau_changelog.xml10
2 files changed, 13 insertions, 14 deletions
diff --git a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
index 51b8530..93fc651 100644
--- a/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
+++ b/sample/src/main/kotlin/ca/allanwang/kau/sample/MainActivity.kt
@@ -224,18 +224,13 @@ class MainActivity : KPrefActivity() {
override fun onCreateOptionsMenu(menu: Menu): Boolean {
menuInflater.inflate(R.menu.menu_main, menu)
if (searchView == null) searchView = bindSearchView(menu, R.id.action_search) {
- textObserver = {
- observable, searchView ->
- /*
- * Notice that this function is automatically executed in a new thread
- * and that the results will automatically be set on the ui thread
- */
- observable.subscribe {
- text ->
- val items = wordBank.filter { it.contains(text) }.sorted().map { SearchItem(it) }
- searchView.results = items
- }
+
+ textCallback = {
+ query, searchView ->
+ val items = wordBank.filter { it.contains(query) }.sorted().map { SearchItem(it) }
+ searchView.results = items
}
+ textDebounceInterval = 0
noResultsFound = R.string.kau_no_results_found
shouldClearOnClose = false
onItemClick = {
diff --git a/sample/src/main/res/xml/kau_changelog.xml b/sample/src/main/res/xml/kau_changelog.xml
index c11353d..96ae965 100644
--- a/sample/src/main/res/xml/kau_changelog.xml
+++ b/sample/src/main/res/xml/kau_changelog.xml
@@ -6,7 +6,13 @@
<item text="" />
-->
- <version title="v3.2.4"/>
+ <version title="v3.3.0"/>
+ <item text=":core: Create debounce methods" />
+ <item text=":searchview: [Breaking] remove reactive dependencies and stick with basic callbacks" />
+ <item text="" />
+ <item text="" />
+
+ <version title="v3.2.5"/>
<item text=":core: Fix FAQ background" />
<item text=":core: Create FileUtils" />
<item text=":core: Create NotificationUtils" />
@@ -14,8 +20,6 @@
<item text=":core: Make logging class functions inline" />
<item text=":core: Create removeIf for mutableIteratables" />
<item text=":core-ui: Move reactive libs to :searchview:" />
- <item text="" />
- <item text="" />
<version title="v3.2.3"/>
<item text=":about: Modularize everything" />