fix: add info text when no data
This commit is contained in:
@@ -49,8 +49,6 @@ abstract class TripDatabase : RoomDatabase() {
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
object DatabaseModule {
|
||||
|
||||
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
@Provides
|
||||
@Singleton
|
||||
@@ -140,12 +138,12 @@ private class DatabasePrepopulator(
|
||||
currency = "USD"
|
||||
)
|
||||
)
|
||||
for (category in sampleCategories) {
|
||||
categoryDao.insert(category)
|
||||
}
|
||||
for (expense in sampleExpenses) {
|
||||
expenseDao.insert(expense)
|
||||
}
|
||||
// for (category in sampleCategories) {
|
||||
// categoryDao.insert(category)
|
||||
// }
|
||||
// for (expense in sampleExpenses) {
|
||||
// expenseDao.insert(expense)
|
||||
// }
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -19,6 +19,10 @@ data class Trip(
|
||||
@ColumnInfo("currency") val currency: String,
|
||||
@ColumnInfo("budget") val budget: Double = 0.0
|
||||
) {
|
||||
fun isDummy(): Boolean {
|
||||
return this.id == -1
|
||||
}
|
||||
|
||||
companion object {
|
||||
@RequiresApi(Build.VERSION_CODES.O)
|
||||
val DUMMY = Trip(
|
||||
|
||||
Reference in New Issue
Block a user