From 91acb0234057f28dbd6de3013331e98b61dfe2dc Mon Sep 17 00:00:00 2001 From: kunfei Date: Fri, 16 Aug 2019 17:21:27 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/base/BaseActivity.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/java/io/legado/app/base/BaseActivity.kt b/app/src/main/java/io/legado/app/base/BaseActivity.kt index 96d3d21d5..b769f54f4 100644 --- a/app/src/main/java/io/legado/app/base/BaseActivity.kt +++ b/app/src/main/java/io/legado/app/base/BaseActivity.kt @@ -8,6 +8,7 @@ import android.view.View import android.view.WindowManager import androidx.appcompat.app.AppCompatActivity import io.legado.app.R +import io.legado.app.help.ActivityHelp import io.legado.app.lib.theme.ATH import io.legado.app.lib.theme.ColorUtils import io.legado.app.lib.theme.ThemeStore @@ -26,6 +27,7 @@ abstract class BaseActivity(private val layoutID: Int, private val fullScreen: B initTheme() setupSystemBar() super.onCreate(savedInstanceState) + ActivityHelp.getInstance()?.add(this) setContentView(layoutID) onActivityCreated(savedInstanceState) observeLiveBus() @@ -34,6 +36,7 @@ abstract class BaseActivity(private val layoutID: Int, private val fullScreen: B override fun onDestroy() { super.onDestroy() cancel() + ActivityHelp.getInstance()?.remove(this) } abstract fun onActivityCreated(savedInstanceState: Bundle?)