mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2024-12-22 07:44:00 +01:00
Small changes (PR review)
This commit is contained in:
parent
dc04d2848d
commit
8cb7260375
@ -19,7 +19,7 @@ package org.matrix.android.sdk.internal.database
|
||||
import io.realm.Realm
|
||||
import java.io.Closeable
|
||||
|
||||
class RealmInstanceWrapper(private val realm: Realm, private val closeRealmOnClose: Boolean) : Closeable {
|
||||
internal class RealmInstanceWrapper (private val realm: Realm, private val closeRealmOnClose: Boolean) : Closeable {
|
||||
|
||||
override fun close() {
|
||||
if (closeRealmOnClose) {
|
||||
|
@ -31,7 +31,7 @@ import kotlin.concurrent.getOrSet
|
||||
* instance. This does check each time if you are on the main thread or not and returns the appropriate realm instance.
|
||||
*/
|
||||
@SessionScope
|
||||
class RealmSessionProvider @Inject constructor(@SessionDatabase private val monarchy: Monarchy)
|
||||
internal class RealmSessionProvider @Inject constructor(@SessionDatabase private val monarchy: Monarchy)
|
||||
: SessionLifecycleObserver {
|
||||
|
||||
private val realmThreadLocal = ThreadLocal<Realm>()
|
||||
|
@ -326,27 +326,27 @@ internal abstract class SessionModule {
|
||||
|
||||
@Binds
|
||||
@IntoSet
|
||||
abstract fun bindIntegrationManager(observer: IntegrationManager): SessionLifecycleObserver
|
||||
abstract fun bindIntegrationManager(manager: IntegrationManager): SessionLifecycleObserver
|
||||
|
||||
@Binds
|
||||
@IntoSet
|
||||
abstract fun bindWidgetUrlFormatter(observer: DefaultWidgetURLFormatter): SessionLifecycleObserver
|
||||
abstract fun bindWidgetUrlFormatter(formatter: DefaultWidgetURLFormatter): SessionLifecycleObserver
|
||||
|
||||
@Binds
|
||||
@IntoSet
|
||||
abstract fun bindShieldTrustUpdated(observer: ShieldTrustUpdater): SessionLifecycleObserver
|
||||
abstract fun bindShieldTrustUpdated(updater: ShieldTrustUpdater): SessionLifecycleObserver
|
||||
|
||||
@Binds
|
||||
@IntoSet
|
||||
abstract fun bindIdentityService(observer: DefaultIdentityService): SessionLifecycleObserver
|
||||
abstract fun bindIdentityService(service: DefaultIdentityService): SessionLifecycleObserver
|
||||
|
||||
@Binds
|
||||
@IntoSet
|
||||
abstract fun bindDatabaseCleaner(observer: DatabaseCleaner): SessionLifecycleObserver
|
||||
abstract fun bindDatabaseCleaner(cleaner: DatabaseCleaner): SessionLifecycleObserver
|
||||
|
||||
@Binds
|
||||
@IntoSet
|
||||
abstract fun bindRealmSessionProvider(observer: RealmSessionProvider): SessionLifecycleObserver
|
||||
abstract fun bindRealmSessionProvider(provider: RealmSessionProvider): SessionLifecycleObserver
|
||||
|
||||
@Binds
|
||||
abstract fun bindInitialSyncProgressService(service: DefaultInitialSyncProgressService): InitialSyncProgressService
|
||||
|
@ -172,3 +172,6 @@ import org.matrix.androidsdk.crypto.data===2
|
||||
|
||||
### Use `Context#getSystemService` extension function provided by `core-ktx`
|
||||
getSystemService\(Context
|
||||
|
||||
### Use DefaultSharedPreferences.getInstance() instead for better performance
|
||||
PreferenceManager\.getDefaultSharedPreferences==2
|
||||
|
Loading…
Reference in New Issue
Block a user