From e83451ace6047df5b37b0e528625f211a85d6be7 Mon Sep 17 00:00:00 2001 From: KevinX8 Date: Sat, 16 Jan 2021 22:22:51 +0000 Subject: [PATCH 1/2] updated deps --- core-ui/build.gradle.kts | 2 +- feature-home/build.gradle.kts | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core-ui/build.gradle.kts b/core-ui/build.gradle.kts index b79c8ebf..0fa3dcd9 100644 --- a/core-ui/build.gradle.kts +++ b/core-ui/build.gradle.kts @@ -44,7 +44,7 @@ dependencies { implementation(kotlin("reflect")) implementation("androidx.core:core-ktx:1.3.2") implementation("androidx.appcompat:appcompat:1.2.0") - implementation("com.google.android.material:material:1.3.0-beta01") + implementation("com.google.android.material:material:1.3.0-rc01") //https://developer.android.com/jetpack/androidx/releases/lifecycle implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.2.0") diff --git a/feature-home/build.gradle.kts b/feature-home/build.gradle.kts index ae53370f..759b8532 100644 --- a/feature-home/build.gradle.kts +++ b/feature-home/build.gradle.kts @@ -58,7 +58,7 @@ dependencies { implementation("androidx.fragment:fragment-ktx:1.2.5") implementation("androidx.lifecycle:lifecycle-livedata-core-ktx:2.2.0") implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0") - implementation("com.google.android.material:material:1.3.0-beta01") + implementation("com.google.android.material:material:1.3.0-rc01") implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.1.0") implementation("com.squareup.retrofit2:retrofit:2.9.0") @@ -69,18 +69,18 @@ dependencies { implementation("com.squareup.okhttp3:logging-interceptor:4.9.0") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.2") implementation("org.koin:koin-android:2.2.1") implementation("org.koin:koin-android-viewmodel:2.2.1") implementation("org.koin:koin-android-ext:2.2.1") - testImplementation("io.kotest:kotest-runner-junit5:4.3.2") - testImplementation("io.kotest:kotest-assertions-core:4.3.2") - testImplementation("io.kotest:kotest-property:4.3.2") - testImplementation("io.mockk:mockk:1.10.4") + testImplementation("io.kotest:kotest-runner-junit5:4.4.0.RC1") + testImplementation("io.kotest:kotest-assertions-core:4.4.0.RC1") + testImplementation("io.kotest:kotest-property:4.4.0.RC1") + testImplementation("io.mockk:mockk:1.10.5") - androidTestImplementation("io.mockk:mockk-android:1.10.4") + androidTestImplementation("io.mockk:mockk-android:1.10.5") androidTestImplementation("androidx.test:core:1.3.0") androidTestImplementation("androidx.test:runner:1.3.0") androidTestImplementation("androidx.test:rules:1.3.0") From abbefbf21b107f821b3d870931eb8250e7589c67 Mon Sep 17 00:00:00 2001 From: KevinX8 Date: Sat, 16 Jan 2021 23:33:30 +0000 Subject: [PATCH 2/2] fix root models always being created --- .../java/com/vanced/manager/ui/viewmodels/HomeViewModel.kt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/vanced/manager/ui/viewmodels/HomeViewModel.kt b/app/src/main/java/com/vanced/manager/ui/viewmodels/HomeViewModel.kt index 613a3c5e..273e9195 100644 --- a/app/src/main/java/com/vanced/manager/ui/viewmodels/HomeViewModel.kt +++ b/app/src/main/java/com/vanced/manager/ui/viewmodels/HomeViewModel.kt @@ -155,10 +155,12 @@ open class HomeViewModel(private val activity: FragmentActivity): ViewModel() { } init { + if (prefs.getString("vanced_variant", "nonroot") == "root") { + vancedRootModel.value = RootDataModel(vanced, activity, vancedRootPkg, activity.getString(R.string.vanced), AppCompatResources.getDrawable(activity, R.drawable.ic_vanced), "vanced") + musicRootModel.value = RootDataModel(music, activity, musicRootPkg, activity.getString(R.string.music), AppCompatResources.getDrawable(activity, R.drawable.ic_music), "music") + } vancedModel.value = DataModel(vanced, activity, vancedPkg, activity.getString(R.string.vanced), AppCompatResources.getDrawable(activity, R.drawable.ic_vanced)) - vancedRootModel.value = RootDataModel(vanced, activity, vancedRootPkg, activity.getString(R.string.vanced), AppCompatResources.getDrawable(activity, R.drawable.ic_vanced), "vanced") musicModel.value = DataModel(music, activity, musicPkg, activity.getString(R.string.music), AppCompatResources.getDrawable(activity, R.drawable.ic_music)) - musicRootModel.value = RootDataModel(music, activity, musicRootPkg, activity.getString(R.string.music), AppCompatResources.getDrawable(activity, R.drawable.ic_music), "music") microgModel.value = DataModel(microg, activity, microgPkg, activity.getString(R.string.microg), AppCompatResources.getDrawable(activity, R.drawable.ic_microg)) managerModel.value = DataModel(manager, activity, managerPkg, activity.getString(R.string.app_name), AppCompatResources.getDrawable(activity, R.mipmap.ic_launcher)) }