cleanup drafts when user logs out (#2067)
* cleanup drafts when user logs out * delete unused method * remove unneeded sorting from loadDraftsSingle
This commit is contained in:
parent
9580870445
commit
4d856365f9
3 changed files with 19 additions and 0 deletions
|
|
@ -32,9 +32,13 @@ interface DraftDao {
|
|||
@Query("SELECT * FROM DraftEntity WHERE accountId = :accountId ORDER BY id ASC")
|
||||
fun loadDrafts(accountId: Long): DataSource.Factory<Int, DraftEntity>
|
||||
|
||||
@Query("SELECT * FROM DraftEntity WHERE accountId = :accountId")
|
||||
fun loadDraftsSingle(accountId: Long): Single<List<DraftEntity>>
|
||||
|
||||
@Query("DELETE FROM DraftEntity WHERE id = :id")
|
||||
fun delete(id: Int): Completable
|
||||
|
||||
@Query("SELECT * FROM DraftEntity WHERE id = :id")
|
||||
fun find(id: Int): Single<DraftEntity?>
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue