Loading app/ui/base/src/main/java/com/fsck/k9/ui/base/loader/LoaderStateObserver.kt +3 −4 Original line number Diff line number Diff line Loading @@ -31,14 +31,13 @@ private class LoaderStateObserver<T>( ) : Observer<LoaderState<T>> { private val allViews = setOf(loadingView, errorView, dataView) override fun onChanged(state: LoaderState<T>?) { when (state) { null -> Unit override fun onChanged(value: LoaderState<T>) { when (value) { is LoaderState.Loading -> loadingView.show() is LoaderState.Error -> errorView.show() is LoaderState.Data -> { dataView.show() displayData(state.data) displayData(value.data) } } } Loading build.gradle.kts +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ allprojects { substitute(module("org.jetbrains.kotlinx:kotlinx-coroutines-android")) .using( module( "org.jetbrains.kotlinx:kotlinx-coroutines-android:${libs.versions.kotlinCoroutines.get()}", "org.jetbrains.kotlinx:kotlinx-coroutines-android:${libs.versions.kotlinxCoroutines.get()}", ), ) } Loading gradle/libs.versions.toml +25 −25 Original line number Diff line number Diff line Loading @@ -5,13 +5,13 @@ androidGradlePlugin = "7.4.2" ktlint = "0.48.2" kotlin = "1.8.0" kotlinCoroutines = "1.6.4" kotlin = "1.8.10" kotlinxCoroutines = "1.6.4" jetbrainsAnnotations = "24.0.0" androidxAppCompat = "1.6.0" androidxActivity = "1.6.1" androidxActivity = "1.7.0" androidxRecyclerView = "1.2.1" androidxLifecycle = "2.5.1" androidxLifecycle = "2.6.1" androidxNavigation = "2.5.3" androidxConstraintLayout = "2.1.4" androidxFragment = "1.5.5" Loading @@ -19,25 +19,25 @@ androidxCore = "1.9.0" androidxPreference = "1.2.0" androidxDrawerLayout = "1.1.1" androidxTransition = "1.4.1" androidxComposeCompiler = "1.4.1" androidxComposeBom = "2023.01.00" androidxComposeCompiler = "1.4.4" androidxComposeBom = "2023.03.00" androidxComposeMaterial = "1.3.1" fastAdapter = "5.7.0" preferencesFix = "1.1.0" timber = "5.0.1" koinCore = "3.3.2" koinAndroid = "3.3.2" mime4j = "0.8.8" koinCore = "3.4.0" koinAndroid = "3.4.0" mime4j = "0.8.9" okhttp = "4.10.0" glide = "4.14.2" glide = "4.15.1" moshi = "1.14.0" mockito = "5.0.0" mockito = "5.2.0" [plugins] android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } android-lint = { id = "com.android.lint", version.ref = "androidGradlePlugin" } ksp = "com.google.devtools.ksp:1.8.0-1.0.8" ksp = "com.google.devtools.ksp:1.8.10-1.0.9" kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } Loading @@ -46,13 +46,13 @@ detekt = "io.gitlab.arturbosch.detekt:1.22.0" dependency-check = "com.github.ben-manes.versions:0.46.0" [libraries] desugar = "com.android.tools:desugar_jdk_libs:1.1.8" desugar = "com.android.tools:desugar_jdk_libs:2.0.3" kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinCoroutines" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinCoroutines" } kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinCoroutines" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" } kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" } kotlinx-datetime = "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0" jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrainsAnnotations" } androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidxAppCompat" } Loading @@ -62,12 +62,12 @@ androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", ve androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "androidxLifecycle" } androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidxLifecycle" } androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidxLifecycle" } androidx-annotation = "androidx.annotation:annotation:1.5.0" androidx-annotation = "androidx.annotation:annotation:1.6.0" androidx-biometric = "androidx.biometric:biometric:1.1.0" androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment", version.ref = "androidxNavigation" } androidx-navigation-ui = { module = "androidx.navigation:navigation-ui", version.ref = "androidxNavigation" } androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidxConstraintLayout" } androidx-work-ktx = "androidx.work:work-runtime-ktx:2.7.1" androidx-work-ktx = "androidx.work:work-runtime-ktx:2.8.1" androidx-fragment = { module = "androidx.fragment:fragment", version.ref = "androidxFragment" } androidx-localbroadcastmanager = "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0" androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidxCore" } Loading @@ -79,7 +79,7 @@ androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } androidx-compose-activity = "androidx.activity:activity-compose:1.6.1" androidx-compose-activity = { module = "androidx.activity:activity-compose", version.ref = "androidxActivity" } androidx-compose-lifecycle-viewmodel = "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1" androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "androidxComposeMaterial" } androidx-compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "androidxComposeMaterial" } Loading @@ -87,7 +87,7 @@ androidx-compose-navigation = { module = "androidx.navigation:navigation-compose androidx-test-core = "androidx.test:core:1.5.0" androidx-test-ext-junit-ktx = "androidx.test.ext:junit-ktx:1.1.5" androidx-test-espresso-core = "androidx.test.espresso:espresso-core:3.5.1" android-material = "com.google.android.material:material:1.7.0" android-material = "com.google.android.material:material:1.8.0" fastadapter = { module = "com.mikepenz:fastadapter", version.ref = "fastAdapter" } fastadapter-extensions-drag = { module = "com.mikepenz:fastadapter-extensions-drag", version.ref = "fastAdapter" } fastadapter-extensions-utils = { module = "com.mikepenz:fastadapter-extensions-utils", version.ref = "fastAdapter" } Loading @@ -111,10 +111,10 @@ okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version. minidns-hla = "org.minidns:minidns-hla:1.0.4" glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" } jsoup = "org.jsoup:jsoup:1.15.3" apache-httpclient = "org.apache.httpcomponents:httpclient:4.5.13" apache-httpclient5 = "org.apache.httpcomponents.client5:httpclient5:5.1.3" clikt = "com.github.ajalt.clikt:clikt:3.5.1" jsoup = "org.jsoup:jsoup:1.15.4" apache-httpclient = "org.apache.httpcomponents:httpclient:4.5.14" apache-httpclient5 = "org.apache.httpcomponents.client5:httpclient5:5.2.1" clikt = "com.github.ajalt.clikt:clikt:3.5.2" jzlib = "com.jcraft:jzlib:1.0.7" jutf7 = "com.beetstra.jutf7:jutf7:1.0.0" jcip-annotations = "net.jcip:jcip-annotations:1.0" Loading @@ -133,7 +133,7 @@ robolectric = "org.robolectric:robolectric:4.9.2" mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockito" } mockito-kotlin = "org.mockito.kotlin:mockito-kotlin:4.1.0" turbine = "app.cash.turbine:turbine:0.12.1" turbine = "app.cash.turbine:turbine:0.12.3" jdom2 = "org.jdom:jdom2:2.0.6.1" icu4j-charset = "com.ibm.icu:icu4j-charset:72.1" assertk = "com.willowtreeapps.assertk:assertk-jvm:0.25" Loading Loading
app/ui/base/src/main/java/com/fsck/k9/ui/base/loader/LoaderStateObserver.kt +3 −4 Original line number Diff line number Diff line Loading @@ -31,14 +31,13 @@ private class LoaderStateObserver<T>( ) : Observer<LoaderState<T>> { private val allViews = setOf(loadingView, errorView, dataView) override fun onChanged(state: LoaderState<T>?) { when (state) { null -> Unit override fun onChanged(value: LoaderState<T>) { when (value) { is LoaderState.Loading -> loadingView.show() is LoaderState.Error -> errorView.show() is LoaderState.Data -> { dataView.show() displayData(state.data) displayData(value.data) } } } Loading
build.gradle.kts +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ allprojects { substitute(module("org.jetbrains.kotlinx:kotlinx-coroutines-android")) .using( module( "org.jetbrains.kotlinx:kotlinx-coroutines-android:${libs.versions.kotlinCoroutines.get()}", "org.jetbrains.kotlinx:kotlinx-coroutines-android:${libs.versions.kotlinxCoroutines.get()}", ), ) } Loading
gradle/libs.versions.toml +25 −25 Original line number Diff line number Diff line Loading @@ -5,13 +5,13 @@ androidGradlePlugin = "7.4.2" ktlint = "0.48.2" kotlin = "1.8.0" kotlinCoroutines = "1.6.4" kotlin = "1.8.10" kotlinxCoroutines = "1.6.4" jetbrainsAnnotations = "24.0.0" androidxAppCompat = "1.6.0" androidxActivity = "1.6.1" androidxActivity = "1.7.0" androidxRecyclerView = "1.2.1" androidxLifecycle = "2.5.1" androidxLifecycle = "2.6.1" androidxNavigation = "2.5.3" androidxConstraintLayout = "2.1.4" androidxFragment = "1.5.5" Loading @@ -19,25 +19,25 @@ androidxCore = "1.9.0" androidxPreference = "1.2.0" androidxDrawerLayout = "1.1.1" androidxTransition = "1.4.1" androidxComposeCompiler = "1.4.1" androidxComposeBom = "2023.01.00" androidxComposeCompiler = "1.4.4" androidxComposeBom = "2023.03.00" androidxComposeMaterial = "1.3.1" fastAdapter = "5.7.0" preferencesFix = "1.1.0" timber = "5.0.1" koinCore = "3.3.2" koinAndroid = "3.3.2" mime4j = "0.8.8" koinCore = "3.4.0" koinAndroid = "3.4.0" mime4j = "0.8.9" okhttp = "4.10.0" glide = "4.14.2" glide = "4.15.1" moshi = "1.14.0" mockito = "5.0.0" mockito = "5.2.0" [plugins] android-application = { id = "com.android.application", version.ref = "androidGradlePlugin" } android-library = { id = "com.android.library", version.ref = "androidGradlePlugin" } android-lint = { id = "com.android.lint", version.ref = "androidGradlePlugin" } ksp = "com.google.devtools.ksp:1.8.0-1.0.8" ksp = "com.google.devtools.ksp:1.8.10-1.0.9" kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" } kotlin-parcelize = { id = "org.jetbrains.kotlin.plugin.parcelize", version.ref = "kotlin" } kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" } Loading @@ -46,13 +46,13 @@ detekt = "io.gitlab.arturbosch.detekt:1.22.0" dependency-check = "com.github.ben-manes.versions:0.46.0" [libraries] desugar = "com.android.tools:desugar_jdk_libs:1.1.8" desugar = "com.android.tools:desugar_jdk_libs:2.0.3" kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" } kotlin-reflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinCoroutines" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinCoroutines" } kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinCoroutines" } kotlinx-coroutines-core = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" } kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "kotlinxCoroutines" } kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" } kotlinx-datetime = "org.jetbrains.kotlinx:kotlinx-datetime:0.4.0" jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrainsAnnotations" } androidx-appcompat = { module = "androidx.appcompat:appcompat", version.ref = "androidxAppCompat" } Loading @@ -62,12 +62,12 @@ androidx-lifecycle-common = { module = "androidx.lifecycle:lifecycle-common", ve androidx-lifecycle-livedata-ktx = { module = "androidx.lifecycle:lifecycle-livedata-ktx", version.ref = "androidxLifecycle" } androidx-lifecycle-runtime-ktx = { module = "androidx.lifecycle:lifecycle-runtime-ktx", version.ref = "androidxLifecycle" } androidx-lifecycle-viewmodel-ktx = { module = "androidx.lifecycle:lifecycle-viewmodel-ktx", version.ref = "androidxLifecycle" } androidx-annotation = "androidx.annotation:annotation:1.5.0" androidx-annotation = "androidx.annotation:annotation:1.6.0" androidx-biometric = "androidx.biometric:biometric:1.1.0" androidx-navigation-fragment = { module = "androidx.navigation:navigation-fragment", version.ref = "androidxNavigation" } androidx-navigation-ui = { module = "androidx.navigation:navigation-ui", version.ref = "androidxNavigation" } androidx-constraintlayout = { module = "androidx.constraintlayout:constraintlayout", version.ref = "androidxConstraintLayout" } androidx-work-ktx = "androidx.work:work-runtime-ktx:2.7.1" androidx-work-ktx = "androidx.work:work-runtime-ktx:2.8.1" androidx-fragment = { module = "androidx.fragment:fragment", version.ref = "androidxFragment" } androidx-localbroadcastmanager = "androidx.localbroadcastmanager:localbroadcastmanager:1.1.0" androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidxCore" } Loading @@ -79,7 +79,7 @@ androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" } androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" } androidx-compose-ui-test-manifest = { module = "androidx.compose.ui:ui-test-manifest" } androidx-compose-ui-test-junit4 = { module = "androidx.compose.ui:ui-test-junit4" } androidx-compose-activity = "androidx.activity:activity-compose:1.6.1" androidx-compose-activity = { module = "androidx.activity:activity-compose", version.ref = "androidxActivity" } androidx-compose-lifecycle-viewmodel = "androidx.lifecycle:lifecycle-viewmodel-compose:2.5.1" androidx-compose-material = { module = "androidx.compose.material:material", version.ref = "androidxComposeMaterial" } androidx-compose-material-icons-extended = { module = "androidx.compose.material:material-icons-extended", version.ref = "androidxComposeMaterial" } Loading @@ -87,7 +87,7 @@ androidx-compose-navigation = { module = "androidx.navigation:navigation-compose androidx-test-core = "androidx.test:core:1.5.0" androidx-test-ext-junit-ktx = "androidx.test.ext:junit-ktx:1.1.5" androidx-test-espresso-core = "androidx.test.espresso:espresso-core:3.5.1" android-material = "com.google.android.material:material:1.7.0" android-material = "com.google.android.material:material:1.8.0" fastadapter = { module = "com.mikepenz:fastadapter", version.ref = "fastAdapter" } fastadapter-extensions-drag = { module = "com.mikepenz:fastadapter-extensions-drag", version.ref = "fastAdapter" } fastadapter-extensions-utils = { module = "com.mikepenz:fastadapter-extensions-utils", version.ref = "fastAdapter" } Loading @@ -111,10 +111,10 @@ okhttp-mockwebserver = { module = "com.squareup.okhttp3:mockwebserver", version. minidns-hla = "org.minidns:minidns-hla:1.0.4" glide = { module = "com.github.bumptech.glide:glide", version.ref = "glide" } glide-compiler = { module = "com.github.bumptech.glide:compiler", version.ref = "glide" } jsoup = "org.jsoup:jsoup:1.15.3" apache-httpclient = "org.apache.httpcomponents:httpclient:4.5.13" apache-httpclient5 = "org.apache.httpcomponents.client5:httpclient5:5.1.3" clikt = "com.github.ajalt.clikt:clikt:3.5.1" jsoup = "org.jsoup:jsoup:1.15.4" apache-httpclient = "org.apache.httpcomponents:httpclient:4.5.14" apache-httpclient5 = "org.apache.httpcomponents.client5:httpclient5:5.2.1" clikt = "com.github.ajalt.clikt:clikt:3.5.2" jzlib = "com.jcraft:jzlib:1.0.7" jutf7 = "com.beetstra.jutf7:jutf7:1.0.0" jcip-annotations = "net.jcip:jcip-annotations:1.0" Loading @@ -133,7 +133,7 @@ robolectric = "org.robolectric:robolectric:4.9.2" mockito-core = { module = "org.mockito:mockito-core", version.ref = "mockito" } mockito-inline = { module = "org.mockito:mockito-inline", version.ref = "mockito" } mockito-kotlin = "org.mockito.kotlin:mockito-kotlin:4.1.0" turbine = "app.cash.turbine:turbine:0.12.1" turbine = "app.cash.turbine:turbine:0.12.3" jdom2 = "org.jdom:jdom2:2.0.6.1" icu4j-charset = "com.ibm.icu:icu4j-charset:72.1" assertk = "com.willowtreeapps.assertk:assertk-jvm:0.25" Loading