From 3ef26f7c6f3729ca5505661aceb9629b8a28b75d Mon Sep 17 00:00:00 2001 From: Hamza417 <23103729+Hamza417@users.noreply.github.com> Date: Sun, 22 Dec 2024 13:40:23 +0530 Subject: [PATCH] Removed animations from keywords database --- .../java/app/simple/inure/adapters/music/AdapterMusic.kt | 2 +- .../simple/inure/dialogs/search/SearchKeywordDatabase.kt | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/app/simple/inure/adapters/music/AdapterMusic.kt b/app/src/main/java/app/simple/inure/adapters/music/AdapterMusic.kt index e9d7a33be..14bc86d5b 100644 --- a/app/src/main/java/app/simple/inure/adapters/music/AdapterMusic.kt +++ b/app/src/main/java/app/simple/inure/adapters/music/AdapterMusic.kt @@ -113,7 +113,7 @@ class AdapterMusic(val list: ArrayList, val headerMode: Boolean) : R } } else if (holder is Header) { holder.total.text = buildString { - list.size.toString() + append(list.size) } } } diff --git a/app/src/main/java/app/simple/inure/dialogs/search/SearchKeywordDatabase.kt b/app/src/main/java/app/simple/inure/dialogs/search/SearchKeywordDatabase.kt index e65549fd2..b3e4aa783 100644 --- a/app/src/main/java/app/simple/inure/dialogs/search/SearchKeywordDatabase.kt +++ b/app/src/main/java/app/simple/inure/dialogs/search/SearchKeywordDatabase.kt @@ -22,6 +22,7 @@ class SearchKeywordDatabase : ScopedBottomSheetFragment() { private lateinit var search: DynamicCornerEditText private lateinit var searchKeywordDatabaseViewModel: SearchKeywordDatabaseViewModel private lateinit var searchKeywordDatabaseCallback: SearchKeywordDatabaseCallback + private var adapter: AdapterSearchKeywordDatabase? = null private var keyword: String = "" @@ -48,18 +49,22 @@ class SearchKeywordDatabase : ScopedBottomSheetFragment() { when (requireArguments().getInt(BundleConstants.mode)) { PERMISSIONS -> { searchKeywordDatabaseViewModel.getPermissions().observe(viewLifecycleOwner) { strings -> - recyclerView.adapter = AdapterSearchKeywordDatabase(strings, keyword) { + adapter = AdapterSearchKeywordDatabase(strings, keyword) { searchKeywordDatabaseCallback.onSearchKeywordDatabaseClicked(it) dismiss() } + + recyclerView.setExclusiveAdapter(adapter) } } TRACKERS -> { searchKeywordDatabaseViewModel.getTrackers().observe(viewLifecycleOwner) { strings -> - recyclerView.adapter = AdapterSearchKeywordDatabase(strings, keyword) { + adapter = AdapterSearchKeywordDatabase(strings, keyword) { searchKeywordDatabaseCallback.onSearchKeywordDatabaseClicked(it) dismiss() } + + recyclerView.setExclusiveAdapter(adapter) } } }