Convert DraftTable to kotlin.

This commit is contained in:
Greyson Parrelli
2022-12-06 17:28:59 -05:00
committed by Alex Hart
parent 0bef37bfc1
commit fc8cf2957f
4 changed files with 185 additions and 212 deletions

View File

@@ -46,7 +46,7 @@ class DraftRepository(
}
draftTable.replaceDrafts(actualThreadId, drafts)
threadTable.updateSnippet(actualThreadId, drafts.getSnippet(context), drafts.uriSnippet, System.currentTimeMillis(), MmsSmsColumns.Types.BASE_DRAFT_TYPE, true)
threadTable.updateSnippet(actualThreadId, drafts.getSnippet(context), drafts.getUriSnippet(), System.currentTimeMillis(), MmsSmsColumns.Types.BASE_DRAFT_TYPE, true)
} else if (threadId > 0) {
draftTable.clearDrafts(threadId)
threadTable.update(threadId, unarchive = false, allowDeletion = false)

View File

@@ -74,7 +74,7 @@ class DraftViewModel @JvmOverloads constructor(
fun setLocationDraft(place: SignalPlace) {
store.update {
saveDrafts(it.copy(locationDraft = Draft(Draft.LOCATION, place.serialize())))
saveDrafts(it.copy(locationDraft = Draft(Draft.LOCATION, place.serialize() ?: "")))
}
}