mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 11:05:25 +00:00
Tidy up storage
This commit is contained in:
parent
d2a4f12c29
commit
79db7bdc5c
File diff suppressed because it is too large
Load Diff
@ -17,6 +17,7 @@ interface DatabaseComponent {
|
|||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
|
@Deprecated("Should use a properly DI instance of components")
|
||||||
fun get(context: Context) = ApplicationContext.getInstance(context).databaseComponent
|
fun get(context: Context) = ApplicationContext.getInstance(context).databaseComponent
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -139,19 +139,6 @@ object DatabaseModule {
|
|||||||
@Singleton
|
@Singleton
|
||||||
fun provideExpirationConfigurationDatabase(@ApplicationContext context: Context, openHelper: SQLCipherOpenHelper) = ExpirationConfigurationDatabase(context, openHelper)
|
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
|
@Provides
|
||||||
@Singleton
|
@Singleton
|
||||||
fun provideAttachmentProvider(@ApplicationContext context: Context, openHelper: SQLCipherOpenHelper): MessageDataProvider = DatabaseAttachmentProvider(context, openHelper)
|
fun provideAttachmentProvider(@ApplicationContext context: Context, openHelper: SQLCipherOpenHelper): MessageDataProvider = DatabaseAttachmentProvider(context, openHelper)
|
||||||
|
Loading…
Reference in New Issue
Block a user