diff --git a/app/src/main/java/org/schabi/newpipe/database/history/dao/HistoryDAO.kt b/app/src/main/java/org/schabi/newpipe/database/history/dao/HistoryDAO.kt index d986d0c3b..fda46073b 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/dao/HistoryDAO.kt +++ b/app/src/main/java/org/schabi/newpipe/database/history/dao/HistoryDAO.kt @@ -9,5 +9,5 @@ package org.schabi.newpipe.database.history.dao import org.schabi.newpipe.database.BasicDAO interface HistoryDAO : BasicDAO { - val latestEntry: T + val latestEntry: T? } diff --git a/app/src/main/java/org/schabi/newpipe/database/history/dao/SearchHistoryDAO.kt b/app/src/main/java/org/schabi/newpipe/database/history/dao/SearchHistoryDAO.kt index a249721fc..e20e10de9 100644 --- a/app/src/main/java/org/schabi/newpipe/database/history/dao/SearchHistoryDAO.kt +++ b/app/src/main/java/org/schabi/newpipe/database/history/dao/SearchHistoryDAO.kt @@ -15,7 +15,7 @@ import org.schabi.newpipe.database.history.model.SearchHistoryEntry interface SearchHistoryDAO : HistoryDAO { @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