-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed clearing the database when a user is switching to a non-sync fo…
…lder. Created AttachmentDao.| #793
- Loading branch information
Showing
8 changed files
with
66 additions
and
287 deletions.
There are no files selected for viewing
41 changes: 0 additions & 41 deletions
41
FlowCrypt/src/main/java/com/flowcrypt/email/database/DatabaseUtil.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
FlowCrypt/src/main/java/com/flowcrypt/email/database/dao/AttachmentDao.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* © 2016-2019 FlowCrypt Limited. Limitations apply. Contact [email protected] | ||
* Contributors: DenBond7 | ||
*/ | ||
|
||
package com.flowcrypt.email.database.dao | ||
|
||
import androidx.room.Dao | ||
import androidx.room.Query | ||
import com.flowcrypt.email.database.entity.AttachmentEntity | ||
|
||
/** | ||
* This class describes available methods for [AttachmentEntity] | ||
* | ||
* @author Denis Bondarenko | ||
* Date: 12/20/19 | ||
* Time: 10:12 AM | ||
* E-mail: [email protected] | ||
*/ | ||
@Dao | ||
interface AttachmentDao : BaseDao<AttachmentEntity> { | ||
@Query("DELETE FROM attachment WHERE email = :email AND folder = :label") | ||
suspend fun delete(email: String?, label: String?): Int | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.