Skip to content

Commit 5c9ac91

Browse files
committed
StreamHistoryDAO: Latest entry can be null
Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
1 parent ffb82dc commit 5c9ac91

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/src/main/java/org/schabi/newpipe/database/history/dao/StreamHistoryDAO.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ abstract class StreamHistoryDAO : BasicDAO<StreamHistoryEntity> {
3535
abstract val historySortedById: Flowable<MutableList<StreamHistoryEntry>>
3636

3737
@Query("SELECT * FROM stream_history WHERE stream_id = :streamId ORDER BY access_date DESC LIMIT 1")
38-
abstract fun getLatestEntry(streamId: Long): StreamHistoryEntity
38+
abstract fun getLatestEntry(streamId: Long): StreamHistoryEntity?
3939

4040
@Query("DELETE FROM stream_history WHERE stream_id = :streamId")
4141
abstract fun deleteStreamHistory(streamId: Long): Int

0 commit comments

Comments
 (0)