diff --git a/app/src/main/java/com/nextcloud/talk/dagger/modules/DatabaseModule.java b/app/src/main/java/com/nextcloud/talk/dagger/modules/DatabaseModule.java index 01ca3f7f7..8f2a91ef1 100644 --- a/app/src/main/java/com/nextcloud/talk/dagger/modules/DatabaseModule.java +++ b/app/src/main/java/com/nextcloud/talk/dagger/modules/DatabaseModule.java @@ -93,6 +93,6 @@ public class DatabaseModule { @Provides @Singleton public TalkDatabase provideTalkDatabase(@NonNull final Context context) { - return TalkDatabase.Companion.getInstance(context); + return TalkDatabase.getInstance(context); } } diff --git a/app/src/main/java/com/nextcloud/talk/data/source/local/TalkDatabase.kt b/app/src/main/java/com/nextcloud/talk/data/source/local/TalkDatabase.kt index c6da1d53c..5f854f38c 100644 --- a/app/src/main/java/com/nextcloud/talk/data/source/local/TalkDatabase.kt +++ b/app/src/main/java/com/nextcloud/talk/data/source/local/TalkDatabase.kt @@ -62,6 +62,7 @@ abstract class TalkDatabase : RoomDatabase() { @Volatile private var INSTANCE: TalkDatabase? = null + @JvmStatic fun getInstance(context: Context): TalkDatabase = INSTANCE ?: synchronized(this) { INSTANCE ?: build(context).also { INSTANCE = it }