From 277d8773f22e324550a26885323f05acccc5ce11 Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Fri, 4 Oct 2019 19:35:22 +0200 Subject: [PATCH] Added automated loading to new compat-based redesign --- .../magisk/redesign/compat/CompatActivity.kt | 6 ++++++ .../magisk/redesign/compat/CompatDelegate.kt | 4 ++++ .../magisk/redesign/compat/CompatFragment.kt | 6 ++++++ .../magisk/redesign/compat/CompatViewModel.kt | 14 ++++++++++++++ 4 files changed, 30 insertions(+) diff --git a/app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatActivity.kt b/app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatActivity.kt index f56bcb118..8aef13008 100644 --- a/app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatActivity.kt +++ b/app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatActivity.kt @@ -18,4 +18,10 @@ abstract class CompatActivity ) { + fun onResume() { + view.viewModel.requestRefresh() + } + fun ensureInsets() { ViewCompat.setOnApplyWindowInsetsListener(view.viewRoot) { _, insets -> insets.asInsets() diff --git a/app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatFragment.kt b/app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatFragment.kt index 196f37ae2..52bd1c65b 100644 --- a/app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatFragment.kt +++ b/app/src/main/java/com/topjohnwu/magisk/redesign/compat/CompatFragment.kt @@ -18,4 +18,10 @@ abstract class CompatFragment