changed to reset all necessary state, regardless of editingMode, in clearCurrentMessageIntent handler

This commit is contained in:
gavine99
2025-02-19 13:32:35 +11:00
parent a8b02459c4
commit 302dadd077
@@ -1102,23 +1102,14 @@ class ComposeViewModel @Inject constructor(
view.setDraft("") view.setDraft("")
// if choosing contacts, don't remove attachments. they may have come from an // if choosing contacts, don't remove attachments. they may have come from an
// external share // external share
if (it.editingMode) newState {
newState { copy(
copy( editingMode = false,
editingMode = false, hasError = !sendAsGroup,
hasError = !sendAsGroup, attachments = listOf(),
scheduled = 0, scheduled = 0,
) )
} }
else
newState {
copy(
editingMode = false,
hasError = !sendAsGroup,
attachments = listOf(),
scheduled = 0,
)
}
} }
// when activity changes visibility, delete old recording cache files in background thread // when activity changes visibility, delete old recording cache files in background thread