Skip to content

Instantly share code, notes, and snippets.

@TorkelV
Created October 20, 2020 21:53
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 TorkelV/7db486c35d3cf5cdb5740d65662377be to your computer and use it in GitHub Desktop.
Save TorkelV/7db486c35d3cf5cdb5740d65662377be to your computer and use it in GitHub Desktop.
fun addPhrase(phrase: String, translation: String, groupId: String){
if(phrase.isNotEmpty() && translation.isNotEmpty()){
viewmodelScope.launch(Dispatchers.IO){
db.addAll(Phrase(newPhrase, newTranslation))
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment