DANA: make data in history activity descending

This commit is contained in:
Milos Kozak 2021-12-06 16:50:12 +01:00
parent 119d2c8f0e
commit 3875957801

View file

@ -9,7 +9,7 @@ import io.reactivex.Single
@Dao
abstract class DanaHistoryRecordDao {
@Query("SELECT * from $TABLE_DANA_HISTORY WHERE timestamp >= :timestamp AND code = :type")
@Query("SELECT * from $TABLE_DANA_HISTORY WHERE timestamp >= :timestamp AND code = :type ORDER BY timestamp DESC")
abstract fun allFromByType(timestamp: Long, type: Byte): Single<List<DanaHistoryRecord>>
@Insert(onConflict = OnConflictStrategy.REPLACE)