Skip to content

Instantly share code, notes, and snippets.

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 EdwardvanRaak/d1e46beeda1deaf2cc5bf5577ce03dcd to your computer and use it in GitHub Desktop.
Save EdwardvanRaak/d1e46beeda1deaf2cc5bf5577ce03dcd to your computer and use it in GitHub Desktop.
puzzle.java
if (carenRootPost == null) {
handleNoParentReportFound(incomingReport)
} else {
incomingReport.localId = localId
if (carenRootPost.carenReplies == null)
carenRootPost.carenReplies = RealmList<Report>()
carenRootPost.carenReplies.add(incomingReport)
}
carenRootPost?.apply {
incomingReport.localId = localId
carenReplies = carenReplies ?: RealmList<Report>()
carenReplies.add(incomingReport)
} ?: handleNoParentReportFound(incomingReport)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment