Skip to content

Commit

Permalink
add encryption image
Browse files Browse the repository at this point in the history
  • Loading branch information
ismartcoding committed Apr 20, 2023
1 parent 6851160 commit f415cf5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ Reddit: https://www.reddit.com/r/plainapp

## Screenshots

| ![home](screenshots/1.jpeg) | ![files](screenshots/2.jpeg) | ![web](screenshots/3.jpeg) | ![notes](screenshots/4.jpeg) |
|--------------------------------------|-----------------------------------------|-------------------------------------------|------------------------------------------|
| ![audios](screenshots/5.jpeg) | ![images](screenshots/6.jpeg) | ![videos](screenshots/7.jpeg) | ![rss](screenshots/8.jpeg) |
| ![home](screenshots/web-home.png) | ![images](screenshots/web-images.png) | ![videos](screenshots/web-videos.png) | ![notes](screenshots/web-notes.png) |
| ![files](screenshots/web-files.png) | ![chatgpt](screenshots/web-chatgpt.png) | ![messages](screenshots/web-messages.png) | ![contacts](screenshots/web-contacts.png) |
| ![audios](screenshots/web-audios.png) | ![rss](screenshots/web-rss.png) | | |
| ![home](screenshots/1.jpeg) | ![files](screenshots/2.jpeg) | ![web](screenshots/3.jpeg) | ![notes](screenshots/4.jpeg) |
|----------------------------------------|-----------------------------------------|-----------------------------------------------|-------------------------------------------|
| ![audios](screenshots/5.jpeg) | ![images](screenshots/6.jpeg) | ![videos](screenshots/7.jpeg) | ![rss](screenshots/8.jpeg) |
| ![home](screenshots/web-home.png) | ![images](screenshots/web-images.png) | ![videos](screenshots/web-videos.png) | ![notes](screenshots/web-notes.png) |
| ![files](screenshots/web-files.png) | ![chatgpt](screenshots/web-chatgpt.png) | ![messages](screenshots/web-messages.png) | ![contacts](screenshots/web-contacts.png) |
| ![audios](screenshots/web-audios.png) | ![rss](screenshots/web-rss.png) | ![encryption](screenshots/web-encryption.png) | |

## Compatibility

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import com.ismartcoding.lib.channel.sendEvent
import com.ismartcoding.lib.helpers.CoroutinesHelper.withIO
import com.ismartcoding.plain.features.DeleteChatItemViewEvent
import com.ismartcoding.plain.db.*
import com.ismartcoding.plain.helpers.FileHelper
import java.io.File

object ChatHelper {
suspend fun createChatItemsAsync(message: DMessageContent): List<DChat> {
Expand All @@ -26,7 +28,19 @@ object ChatHelper {
}

suspend fun deleteAsync(chatItem: DChat) {
withIO { AppDatabase.instance.chatDao().delete(chatItem.id) }
withIO {
AppDatabase.instance.chatDao().delete(chatItem.id)
val v = chatItem.content.value
if (v is DMessageFiles) {
v.items.forEach {
File(it.uri).delete()
}
} else if (v is DMessageImages) {
v.items.forEach {
File(it.uri).delete()
}
}
}
sendEvent(DeleteChatItemViewEvent(chatItem.id))
}

Expand Down
Binary file added screenshots/web-encryption.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f415cf5

Please sign in to comment.