diff --git a/app/src/main/java/com/keylesspalace/tusky/db/DraftDao.kt b/app/src/main/java/com/keylesspalace/tusky/db/DraftDao.kt index 663172244..7b1f62b8c 100644 --- a/app/src/main/java/com/keylesspalace/tusky/db/DraftDao.kt +++ b/app/src/main/java/com/keylesspalace/tusky/db/DraftDao.kt @@ -31,10 +31,10 @@ interface DraftDao { @Query("SELECT * FROM DraftEntity WHERE accountId = :accountId ORDER BY id ASC") fun draftsPagingSource(accountId: Long): PagingSource - @Query("SELECT COUNT(*) FROM DraftEntity where accountId = :accountId and failedToSendNew=true") + @Query("SELECT COUNT(*) FROM DraftEntity WHERE accountId = :accountId AND failedToSendNew = 1") fun draftsNeedUserAlert(accountId: Long): LiveData - @Query("UPDATE DraftEntity SET failedToSendNew=false where accountId = :accountId and failedToSendNew=true") + @Query("UPDATE DraftEntity SET failedToSendNew = 0 WHERE accountId = :accountId AND failedToSendNew = 1") suspend fun draftsClearNeedUserAlert(accountId: Long) @Query("SELECT * FROM DraftEntity WHERE accountId = :accountId")