mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-01 20:22:03 +00:00
annotate JvmStatic for more idiomatic access from Java
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
74fc56fa7e
commit
c9ba0fe870
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user