Fix issue where upload notification shows up on app start (#4099)

This commit is contained in:
Vivek Maskara 2020-12-14 05:55:17 -07:00 committed by GitHub
parent 0415a57d34
commit 5c6e777b37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 10 deletions

View file

@ -68,6 +68,9 @@ public abstract class ContributionDao {
@Query("UPDATE contribution SET state=:state WHERE state in (:toUpdateStates)")
public abstract Single<Integer> updateStates(int state, int[] toUpdateStates);
@Query("SELECT COUNT(*) from contribution WHERE state in (:toUpdateStates)")
public abstract Single<Integer> getPendingUploads(int[] toUpdateStates);
@Query("Delete FROM contribution")
public abstract void deleteAll() throws SQLiteException;