Skip to content

Commit

Permalink
Lift DeviceRepository to AppModule
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawa committed May 31, 2024
1 parent 71d3cfa commit 1ae9d34
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import net.mullvad.mullvadvpn.lib.intent.IntentProvider
import net.mullvad.mullvadvpn.lib.model.BuildVersion
import net.mullvad.mullvadvpn.lib.shared.AccountRepository
import net.mullvad.mullvadvpn.lib.shared.ConnectionProxy
import net.mullvad.mullvadvpn.lib.shared.DeviceRepository
import net.mullvad.mullvadvpn.lib.shared.VpnPermissionRepository
import org.koin.android.ext.koin.androidContext
import org.koin.core.qualifier.named
Expand All @@ -25,6 +26,7 @@ val appModule = module {
single { BuildVersion(BuildConfig.VERSION_NAME, BuildConfig.VERSION_CODE) }
single { IntentProvider() }
single { AccountRepository(get(), get(), MainScope()) }
single { DeviceRepository(get()) }
single { VpnPermissionRepository(androidContext()) }
single { ConnectionProxy(get(), get()) }
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import net.mullvad.mullvadvpn.constant.IS_PLAY_BUILD
import net.mullvad.mullvadvpn.dataproxy.MullvadProblemReport
import net.mullvad.mullvadvpn.lib.model.GeoLocationId
import net.mullvad.mullvadvpn.lib.payment.PaymentProvider
import net.mullvad.mullvadvpn.lib.shared.DeviceRepository
import net.mullvad.mullvadvpn.lib.shared.VoucherRepository
import net.mullvad.mullvadvpn.repository.ChangelogRepository
import net.mullvad.mullvadvpn.repository.CustomListsRepository
Expand Down Expand Up @@ -100,7 +99,6 @@ val uiModule = module {
single { androidContext().contentResolver }

single { ChangelogRepository(get(named(APP_PREFERENCES_NAME)), get()) }
single { DeviceRepository(get()) }
single {
PrivacyDisclaimerRepository(
androidContext().getSharedPreferences(APP_PREFERENCES_NAME, Context.MODE_PRIVATE),
Expand Down

0 comments on commit 1ae9d34

Please sign in to comment.