Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Unverified Commit c82d33b5 authored by Wolf-Martell Montwé's avatar Wolf-Martell Montwé Committed by GitHub
Browse files

Merge pull request #9128 from wmontwe/bump-koin

Bump koin to 4.0.4
parents 6fa15e0a 6d9f8649
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -8,13 +8,10 @@ android {

dependencies {
    api(projects.legacy.common)

    api(projects.legacy.ui.legacy)

    api(projects.feature.account.core)

    api(projects.feature.launcher)

    api(projects.feature.navigation.drawer.api)

    implementation(projects.legacy.core)
@@ -27,6 +24,9 @@ dependencies {

    implementation(projects.feature.account.setup)
    implementation(projects.feature.migration.provider)
    implementation(projects.feature.widget.messageList)

    implementation(projects.mail.protocols.imap)

    implementation(libs.androidx.work.runtime)
}
+9 −0
Original line number Diff line number Diff line
package net.thunderbird.app.common

import com.fsck.k9.legacyCommonAppModules
import com.fsck.k9.legacyCoreModules
import com.fsck.k9.legacyUiModules
import net.thunderbird.app.common.account.appCommonAccountModule
import net.thunderbird.app.common.feature.appCommonFeatureModule
import org.koin.core.module.Module
import org.koin.dsl.module

val appCommonModule: Module = module {
    includes(legacyCommonAppModules)
    includes(legacyCoreModules)
    includes(legacyUiModules)

    includes(
        appCommonAccountModule,
        appCommonFeatureModule,
    )
}
+9 −4
Original line number Diff line number Diff line
package com.fsck.k9
package net.thunderbird.app.common

import android.app.Application
import android.content.Context
@@ -6,8 +6,12 @@ import android.content.res.Configuration
import android.content.res.Resources
import app.k9mail.feature.widget.message.list.MessageListWidgetManager
import app.k9mail.legacy.di.DI
import com.fsck.k9.Core
import com.fsck.k9.K9
import com.fsck.k9.MessagingListenerProvider
import com.fsck.k9.controller.MessagingController
import com.fsck.k9.job.WorkManagerConfigurationProvider
import com.fsck.k9.logging.Timber
import com.fsck.k9.notification.NotificationChannelManager
import com.fsck.k9.ui.base.AppLanguageManager
import com.fsck.k9.ui.base.extensions.currentLocale
@@ -21,10 +25,10 @@ import kotlinx.coroutines.flow.onEach
import net.thunderbird.core.ui.theme.manager.ThemeManager
import org.koin.android.ext.android.inject
import org.koin.core.module.Module
import timber.log.Timber
import androidx.work.Configuration as WorkManagerConfiguration

abstract class CommonApp : Application(), WorkManagerConfiguration.Provider {
abstract class BaseApplication : Application(), WorkManagerConfiguration.Provider {

    private val messagingController: MessagingController by inject()
    private val messagingListenerProvider: MessagingListenerProvider by inject()
    private val themeManager: ThemeManager by inject()
@@ -38,10 +42,11 @@ abstract class CommonApp : Application(), WorkManagerConfiguration.Provider {

    override fun attachBaseContext(base: Context?) {
        Core.earlyInit()

        super.attachBaseContext(base)

        // Start Koin early so it is ready by the time content providers are initialized.
        DI.start(this, listOf(provideAppModule()) + coreModules + uiModules + commonAppModules)
        DI.start(this, listOf(provideAppModule()))
    }

    override fun onCreate() {
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ import android.content.res.Resources
import app.k9mail.core.ui.legacy.theme2.common.R
import app.k9mail.legacy.account.AccountManager

class AccountColorPicker(
internal class AccountColorPicker(
    private val accountManager: AccountManager,
    private val resources: Resources,
) {
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext

// TODO Move to feature/account/setup
class AccountCreator(
internal class AccountCreator(
    private val accountColorPicker: AccountColorPicker,
    private val localFoldersCreator: SpecialLocalFoldersCreator,
    private val preferences: Preferences,
Loading