forked from upstream-mirrors/quik
changed to reset all necessary state, regardless of editingMode, in clearCurrentMessageIntent handler
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user