Tidy up storage

closed_groups
SessionHero01 7 months ago
parent d2a4f12c29
commit 79db7bdc5c
No known key found for this signature in database

@ -17,6 +17,7 @@ interface DatabaseComponent {
companion object {
@JvmStatic
@Deprecated("Should use a properly DI instance of components")
fun get(context: Context) = ApplicationContext.getInstance(context).databaseComponent
}

@ -139,19 +139,6 @@ object DatabaseModule {
@Singleton
fun provideExpirationConfigurationDatabase(@ApplicationContext context: Context, openHelper: SQLCipherOpenHelper) = ExpirationConfigurationDatabase(context, openHelper)
@Provides
@Singleton
fun provideStorage(@ApplicationContext context: Context,
openHelper: SQLCipherOpenHelper,
configFactory: ConfigFactory,
threadDatabase: ThreadDatabase,
pollerFactory: PollerFactory,
): Storage {
val storage = Storage(context, openHelper, configFactory, pollerFactory)
threadDatabase.setUpdateListener(storage)
return storage
}
@Provides
@Singleton
fun provideAttachmentProvider(@ApplicationContext context: Context, openHelper: SQLCipherOpenHelper): MessageDataProvider = DatabaseAttachmentProvider(context, openHelper)

Loading…
Cancel
Save