1
0
mirror of https://github.com/TeamNewPipe/NewPipe synced 2025-11-11 04:33:01 +00:00

HistoryDao: latestEntry can be null

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2025-11-08 10:29:43 +08:00
parent 0ffe80e6ec
commit 1aea83798c
2 changed files with 2 additions and 2 deletions

View File

@@ -9,5 +9,5 @@ package org.schabi.newpipe.database.history.dao
import org.schabi.newpipe.database.BasicDAO
interface HistoryDAO<T> : BasicDAO<T> {
val latestEntry: T
val latestEntry: T?
}

View File

@@ -15,7 +15,7 @@ import org.schabi.newpipe.database.history.model.SearchHistoryEntry
interface SearchHistoryDAO : HistoryDAO<SearchHistoryEntry> {
@get:Query("SELECT * FROM search_history WHERE id = (SELECT MAX(id) FROM search_history)")
override val latestEntry: SearchHistoryEntry
override val latestEntry: SearchHistoryEntry?
@Query("DELETE FROM search_history")
override fun deleteAll(): Int