Skip to content

Instantly share code, notes, and snippets.

@MarcoSignoretto
Created May 9, 2023 05:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcoSignoretto/3dedbd174d01637481fcff71c36500ec to your computer and use it in GitHub Desktop.
Save MarcoSignoretto/3dedbd174d01637481fcff71c36500ec to your computer and use it in GitHub Desktop.
override suspend fun insert(title: String, content: String) {
val uid = UUID.randomUUID().toString()
noteDao.insert(
NoteEntity(
uid = uid,
title = title,
content = content.toByteArray(),
isSecured = false,
password = byteArrayOf()
)
)
val notes = fetchNotes()
_stream.emit(notes)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment