From 5c9ac912ac92129d8aff567ad69e39ceb7d52745 Mon Sep 17 00:00:00 2001 From: Aayush Gupta Date: Wed, 3 Dec 2025 16:44:41 +0800 Subject: [PATCH] StreamHistoryDAO: Latest entry can be null Signed-off-by: Aayush Gupta --- .../org/schabi/newpipe/database/history/dao/StreamHistoryDAO.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/org/schabi/newpipe/database/history/dao/StreamHistoryDAO.kt b/app/src/main/java/org/schabi/newpipe/database/history/dao/StreamHistoryDAO.kt index 432c93a55..916d4e5ed 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/dao/StreamHistoryDAO.kt +++ b/app/src/main/java/org/schabi/newpipe/database/history/dao/StreamHistoryDAO.kt @@ -35,7 +35,7 @@ abstract class StreamHistoryDAO : BasicDAO { abstract val historySortedById: Flowable> @Query("SELECT * FROM stream_history WHERE stream_id = :streamId ORDER BY access_date DESC LIMIT 1") - abstract fun getLatestEntry(streamId: Long): StreamHistoryEntity + abstract fun getLatestEntry(streamId: Long): StreamHistoryEntity? @Query("DELETE FROM stream_history WHERE stream_id = :streamId") abstract fun deleteStreamHistory(streamId: Long): Int