Ping service now subscribes to Firebase topics every 15 minutes to keep the app alive, courses and rooms are now struck through if the course is cancelled

This commit is contained in:
Deniz Düzgören
2019-08-21 10:26:54 +02:00
parent 8a659918a7
commit fce4c949b3
9 changed files with 98 additions and 35 deletions
@@ -27,17 +27,19 @@ public abstract class SubstDatabase : RoomDatabase() {
return instance
}
private var foodInstance: SubstDatabase? = null
fun getFoodInstance(context: Context): SubstDatabase? {
if (instance == null) {
if (foodInstance == null) {
synchronized (SubstDatabase::class) {
instance = Room.databaseBuilder(context.applicationContext,
foodInstance = Room.databaseBuilder(context.applicationContext,
SubstDatabase::class.java,
"food_database")
.fallbackToDestructiveMigration()
.build()
}
}
return instance
return foodInstance
}
}
}