mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-16 19:05:27 -04:00
Merge branch 'feature/Frans-Lukas/2238-historybookmarks-to-fragment' of https://github.com/kiwix/kiwix-android into feature/Frans-Lukas/2241-settings-to-fragment
This commit is contained in:
commit
c09bfe3a25
@ -3,7 +3,6 @@ import plugin.KiwixConfigurationPlugin
|
||||
plugins {
|
||||
android
|
||||
id("com.github.triplet.play") version Versions.com_github_triplet_play_gradle_plugin
|
||||
id("androidx.navigation.safeargs")
|
||||
}
|
||||
plugins.apply(KiwixConfigurationPlugin::class)
|
||||
|
||||
@ -84,8 +83,5 @@ dependencies {
|
||||
implementation(Libs.squidb)
|
||||
implementation(Libs.squidb_annotations)
|
||||
implementation(Libs.ink_page_indicator)
|
||||
implementation(Libs.navigation_kotlin_fragment)
|
||||
implementation(Libs.navigation_kotlin_ui)
|
||||
androidTestImplementation(Libs.navigation_kotlin_testing)
|
||||
add("kapt", Libs.squidb_processor)
|
||||
}
|
||||
|
@ -114,7 +114,6 @@ class ZimManageViewModel @Inject constructor(
|
||||
val fileSelectActions = PublishProcessor.create<FileSelectActions>()
|
||||
val requestDownloadLibrary = BehaviorProcessor.createDefault(Unit)
|
||||
val requestFiltering = BehaviorProcessor.createDefault("")
|
||||
val currentPage = PublishProcessor.create<Int>()
|
||||
|
||||
private val compositeDisposable = CompositeDisposable()
|
||||
|
||||
|
@ -42,6 +42,7 @@ class AllProjectConfigurer {
|
||||
target.plugins.apply("com.hiya.jacoco-android")
|
||||
target.plugins.apply("org.jlleitschuh.gradle.ktlint")
|
||||
target.plugins.apply("io.gitlab.arturbosch.detekt")
|
||||
target.plugins.apply("androidx.navigation.safeargs")
|
||||
}
|
||||
|
||||
fun configureBaseExtension(target: Project, path: String) {
|
||||
@ -159,6 +160,10 @@ class AllProjectConfigurer {
|
||||
implementation(Libs.material)
|
||||
implementation(Libs.constraintlayout)
|
||||
implementation(Libs.multidex)
|
||||
// navigation
|
||||
implementation(Libs.navigation_kotlin_fragment)
|
||||
implementation(Libs.navigation_kotlin_ui)
|
||||
androidTestImplementation(Libs.navigation_kotlin_testing)
|
||||
implementation(Libs.okhttp)
|
||||
implementation(Libs.logging_interceptor)
|
||||
implementation(Libs.retrofit)
|
||||
|
@ -14,7 +14,6 @@ buildscript {
|
||||
}
|
||||
plugins {
|
||||
`android-library`
|
||||
id("androidx.navigation.safeargs")
|
||||
}
|
||||
plugins.apply(KiwixConfigurationPlugin::class)
|
||||
apply(plugin = "io.objectbox")
|
||||
@ -62,8 +61,4 @@ dependencies {
|
||||
implementation(Libs.objectbox_kotlin)
|
||||
implementation(Libs.objectbox_rxjava)
|
||||
implementation(Libs.webkit)
|
||||
// navigation
|
||||
implementation(Libs.navigation_kotlin_fragment)
|
||||
implementation(Libs.navigation_kotlin_ui)
|
||||
androidTestImplementation(Libs.navigation_kotlin_testing)
|
||||
}
|
||||
|
@ -18,17 +18,17 @@
|
||||
|
||||
package org.kiwix.kiwixmobile.core.search.viewmodel.effects
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import io.mockk.mockk
|
||||
import io.mockk.verify
|
||||
import org.junit.jupiter.api.Test
|
||||
import org.kiwix.kiwixmobile.core.main.CoreMainActivity
|
||||
|
||||
internal class FinishTest {
|
||||
internal class PopFragmentBackstackTest {
|
||||
|
||||
@Test
|
||||
fun `invoke with finishes the activity`() {
|
||||
val activity = mockk<AppCompatActivity>()
|
||||
fun `invoke with pops activity backstack`() {
|
||||
val activity = mockk<CoreMainActivity>(relaxed = true)
|
||||
PopFragmentBackstack.invokeWith(activity)
|
||||
verify { activity.finish() }
|
||||
verify { activity.navController.popBackStack() }
|
||||
}
|
||||
}
|
@ -35,11 +35,6 @@ android {
|
||||
}
|
||||
}
|
||||
}
|
||||
dependencies {
|
||||
implementation(Libs.navigation_kotlin_fragment)
|
||||
implementation(Libs.navigation_kotlin_ui)
|
||||
androidTestImplementation(Libs.navigation_kotlin_testing)
|
||||
}
|
||||
|
||||
fun ProductFlavor.createDownloadTask(file: File): Task {
|
||||
return tasks.create("download${name.capitalize()}Zim") {
|
||||
|
Loading…
x
Reference in New Issue
Block a user