adds save when closing the screen on new posts.
This commit is contained in:
@@ -235,7 +235,12 @@ fun NewPostView(
|
|||||||
}
|
}
|
||||||
|
|
||||||
Dialog(
|
Dialog(
|
||||||
onDismissRequest = { onClose() },
|
onDismissRequest = {
|
||||||
|
scope.launch {
|
||||||
|
postViewModel.sendDraftSync(relayList = relayList)
|
||||||
|
onClose()
|
||||||
|
}
|
||||||
|
},
|
||||||
properties =
|
properties =
|
||||||
DialogProperties(
|
DialogProperties(
|
||||||
usePlatformDefaultWidth = false,
|
usePlatformDefaultWidth = false,
|
||||||
@@ -294,8 +299,9 @@ fun NewPostView(
|
|||||||
Spacer(modifier = StdHorzSpacer)
|
Spacer(modifier = StdHorzSpacer)
|
||||||
CloseButton(
|
CloseButton(
|
||||||
onPress = {
|
onPress = {
|
||||||
postViewModel.cancel()
|
|
||||||
scope.launch {
|
scope.launch {
|
||||||
|
postViewModel.sendDraftSync(relayList = relayList)
|
||||||
|
postViewModel.cancel()
|
||||||
delay(100)
|
delay(100)
|
||||||
onClose()
|
onClose()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user