Skip to content

Commit 1aea837

Browse files
committed
HistoryDao: latestEntry can be null
Signed-off-by: Aayush Gupta <[email protected]>
1 parent 0ffe80e commit 1aea837

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ package org.schabi.newpipe.database.history.dao
99
import org.schabi.newpipe.database.BasicDAO
1010

1111
interface HistoryDAO<T> : BasicDAO<T> {
12-
val latestEntry: T
12+
val latestEntry: T?
1313
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import org.schabi.newpipe.database.history.model.SearchHistoryEntry
1515
interface SearchHistoryDAO : HistoryDAO<SearchHistoryEntry> {
1616

1717
@get:Query("SELECT * FROM search_history WHERE id = (SELECT MAX(id) FROM search_history)")
18-
override val latestEntry: SearchHistoryEntry
18+
override val latestEntry: SearchHistoryEntry?
1919

2020
@Query("DELETE FROM search_history")
2121
override fun deleteAll(): Int

0 commit comments

Comments
 (0)