fix issues when tapping save in groups & fix message info screen falsely dismissing

pull/1061/head
Ryan ZHAO 1 week ago
parent 480e92c760
commit 6afb2e532d

@ -2183,7 +2183,15 @@ extension ConversationVC:
)
}
},
completionHandler: { _, _ in }
completionHandler: { _, _ in
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(Int(ContextMenuVC.dismissDurationPartOne * 1000))) { [weak self] in
self?.viewModel.showToast(
text: "saved".localized(),
backgroundColor: .toast_background,
inset: Values.largeSpacing + (self?.inputAccessoryView?.frame.height ?? 0)
)
}
}
)
}
@ -2193,14 +2201,6 @@ extension ConversationVC:
}
self?.sendDataExtraction(kind: .mediaSaved(timestamp: UInt64(cellViewModel.timestampMs)))
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(Int(ContextMenuVC.dismissDurationPartOne * 1000))) { [weak self] in
self?.viewModel.showToast(
text: "saved".localized(),
backgroundColor: .toast_background,
inset: Values.largeSpacing + (self?.inputAccessoryView?.frame.height ?? 0)
)
}
}
completion?()

@ -314,11 +314,11 @@ struct MessageInfoScreen: View {
action: {
actions[index].work() {
switch (actions[index].shouldDismissInfoScreen, actions[index].feedback) {
case (false, _): break
case (true, .some):
DispatchQueue.main.asyncAfter(deadline: .now() + 2, execute: {
dismiss()
})
default: dismiss()
}
}

Loading…
Cancel
Save