mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Convert DraftTable to kotlin.
This commit is contained in:
committed by
Alex Hart
parent
0bef37bfc1
commit
fc8cf2957f
@@ -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)
|
||||
|
||||
@@ -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() ?: "")))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user