From 4bb81f35d7e760f5fafdf67f4ad1841fbe549b58 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 2 May 2019 03:21:46 -0400 Subject: [PATCH] Rename MagiskFragment to HomeFragment --- .../com/topjohnwu/magisk/model/navigation/Navigation.kt | 6 +++--- app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt | 2 +- .../magisk/ui/home/{MagiskFragment.kt => HomeFragment.kt} | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) rename app/src/main/java/com/topjohnwu/magisk/ui/home/{MagiskFragment.kt => HomeFragment.kt} (95%) diff --git a/app/src/main/java/com/topjohnwu/magisk/model/navigation/Navigation.kt b/app/src/main/java/com/topjohnwu/magisk/model/navigation/Navigation.kt index 361c79cb9..a08e4c15a 100644 --- a/app/src/main/java/com/topjohnwu/magisk/model/navigation/Navigation.kt +++ b/app/src/main/java/com/topjohnwu/magisk/model/navigation/Navigation.kt @@ -1,7 +1,7 @@ package com.topjohnwu.magisk.model.navigation import com.topjohnwu.magisk.ui.hide.MagiskHideFragment -import com.topjohnwu.magisk.ui.home.MagiskFragment +import com.topjohnwu.magisk.ui.home.HomeFragment import com.topjohnwu.magisk.ui.log.LogFragment import com.topjohnwu.magisk.ui.module.ModulesFragment import com.topjohnwu.magisk.ui.module.ReposFragment @@ -12,8 +12,8 @@ import com.topjohnwu.magisk.ui.superuser.SuperuserFragment object Navigation { fun home() = MagiskNavigationEvent { - navDirections { destination = MagiskFragment::class } - navOptions { popUpTo = MagiskFragment::class } + navDirections { destination = HomeFragment::class } + navOptions { popUpTo = HomeFragment::class } } fun superuser() = MagiskNavigationEvent { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt b/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt index 6ab8b1e81..b21e89a5e 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/MainActivity.kt @@ -12,6 +12,7 @@ import com.topjohnwu.magisk.databinding.ActivityMainBinding import com.topjohnwu.magisk.model.navigation.Navigation import com.topjohnwu.magisk.ui.base.MagiskActivity import com.topjohnwu.magisk.ui.hide.MagiskHideFragment +import com.topjohnwu.magisk.ui.home.HomeFragment import com.topjohnwu.magisk.ui.log.LogFragment import com.topjohnwu.magisk.ui.module.ModulesFragment import com.topjohnwu.magisk.ui.module.ReposFragment @@ -22,7 +23,6 @@ import com.topjohnwu.net.Networking import com.topjohnwu.superuser.Shell import org.koin.androidx.viewmodel.ext.android.viewModel import kotlin.reflect.KClass -import com.topjohnwu.magisk.ui.home.MagiskFragment as HomeFragment open class MainActivity : MagiskActivity() { diff --git a/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt b/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeFragment.kt similarity index 95% rename from app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt rename to app/src/main/java/com/topjohnwu/magisk/ui/home/HomeFragment.kt index 11a4d8554..d0314300f 100644 --- a/app/src/main/java/com/topjohnwu/magisk/ui/home/MagiskFragment.kt +++ b/app/src/main/java/com/topjohnwu/magisk/ui/home/HomeFragment.kt @@ -8,6 +8,7 @@ import com.topjohnwu.magisk.R import com.topjohnwu.magisk.databinding.FragmentMagiskBinding import com.topjohnwu.magisk.model.events.* import com.topjohnwu.magisk.ui.base.MagiskActivity +import com.topjohnwu.magisk.ui.base.MagiskFragment import com.topjohnwu.magisk.utils.ISafetyNetHelper import com.topjohnwu.magisk.view.MarkDownWindow import com.topjohnwu.magisk.view.SafetyNet @@ -16,9 +17,8 @@ import com.topjohnwu.magisk.view.dialogs.* import com.topjohnwu.net.Networking import com.topjohnwu.superuser.Shell import org.koin.androidx.viewmodel.ext.android.viewModel -import com.topjohnwu.magisk.ui.base.MagiskFragment as NewMagiskFragment -class MagiskFragment : NewMagiskFragment(), +class HomeFragment : MagiskFragment(), ISafetyNetHelper.Callback { override val layoutRes: Int = R.layout.fragment_magisk