aboutsummaryrefslogtreecommitdiff
path: root/kpref-activity/src
diff options
context:
space:
mode:
Diffstat (limited to 'kpref-activity/src')
-rw-r--r--kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
index 4377631..2b75328 100644
--- a/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
+++ b/kpref-activity/src/main/kotlin/ca/allanwang/kau/kpref/activity/KPrefActivity.kt
@@ -115,6 +115,8 @@ abstract class KPrefActivity : KauBaseActivity(), KPrefActivityContract {
* This will adjust the list of items change in visibility
*/
fun reloadList() {
+ // If for some reason we are calling a reload before fetching our first kpref list, we will ignore it
+ if (kprefStack.size < 1) return
recycler.itemAnimator = null
val list = kprefStack.peek().second
adapter.setNewList(list.filter { it.core.visible() })