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:
@@ -9,5 +9,5 @@ package org.schabi.newpipe.database.history.dao
|
|||||||
import org.schabi.newpipe.database.BasicDAO
|
import org.schabi.newpipe.database.BasicDAO
|
||||||
|
|
||||||
interface HistoryDAO<T> : BasicDAO<T> {
|
interface HistoryDAO<T> : BasicDAO<T> {
|
||||||
val latestEntry: T
|
val latestEntry: T?
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import org.schabi.newpipe.database.history.model.SearchHistoryEntry
|
|||||||
interface SearchHistoryDAO : HistoryDAO<SearchHistoryEntry> {
|
interface SearchHistoryDAO : HistoryDAO<SearchHistoryEntry> {
|
||||||
|
|
||||||
@get:Query("SELECT * FROM search_history WHERE id = (SELECT MAX(id) FROM search_history)")
|
@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")
|
@Query("DELETE FROM search_history")
|
||||||
override fun deleteAll(): Int
|
override fun deleteAll(): Int
|
||||||
|
|||||||
Reference in New Issue
Block a user