Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Apr 19, 2024
1 parent 45e658f commit 7eceb67
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -203,10 +203,10 @@ class NewMessageViewModel @Inject constructor(
}

private fun getExistingDraft(localUuid: String?, realm: Realm): Draft? {
return getLocalOrRemoteDraft(localUuid)?.also {
saveNavArgsToSavedState(it.localUuid)
if (it.identityId.isNullOrBlank()) it.identityId = SignatureController.getSignature(realm).id.toString()
if (it.body.isNotEmpty()) splitSignatureAndQuoteFromBody(it)
return getLocalOrRemoteDraft(localUuid)?.also { draft ->
saveNavArgsToSavedState(draft.localUuid)
if (draft.identityId.isNullOrBlank()) draft.identityId = SignatureController.getSignature(realm).id.toString()
if (draft.body.isNotEmpty()) splitSignatureAndQuoteFromBody(draft)
}
}

Expand Down

0 comments on commit 7eceb67

Please sign in to comment.