fix issues after merging

pull/1061/head
Ryan ZHAO 8 months ago
parent b57fbbd32c
commit 082f5b2713

@ -2006,23 +2006,29 @@ extension ConversationVC:
UIPasteboard.general.setData(data, forPasteboardType: type.identifier) UIPasteboard.general.setData(data, forPasteboardType: type.identifier)
} }
self.viewModel.showToast(
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(Int(ContextMenuVC.dismissDurationPartOne * 1000))) { [weak self] in
self?.viewModel.showToast(
text: "copied".localized(), text: "copied".localized(),
backgroundColor: .toast_background, backgroundColor: .toast_background,
insect: Values.largeSpacing + (self.inputAccessoryView?.frame.height ?? 0) inset: Values.largeSpacing + (self?.inputAccessoryView?.frame.height ?? 0)
) )
} }
}
func copySessionID(_ cellViewModel: MessageViewModel) { func copySessionID(_ cellViewModel: MessageViewModel) {
guard cellViewModel.variant == .standardIncoming else { return } guard cellViewModel.variant == .standardIncoming else { return }
UIPasteboard.general.string = cellViewModel.authorId UIPasteboard.general.string = cellViewModel.authorId
self.viewModel.showToast(
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(Int(ContextMenuVC.dismissDurationPartOne * 1000))) { [weak self] in
self?.viewModel.showToast(
text: "copied".localized(), text: "copied".localized(),
backgroundColor: .toast_background, backgroundColor: .toast_background,
insect: Values.largeSpacing + (self.inputAccessoryView?.frame.height ?? 0) inset: Values.largeSpacing + (self?.inputAccessoryView?.frame.height ?? 0)
) )
} }
}
func delete(_ cellViewModel: MessageViewModel) { func delete(_ cellViewModel: MessageViewModel) {
/// Retrieve the deletion actions for the selected message(s) of there are any /// Retrieve the deletion actions for the selected message(s) of there are any
@ -2175,13 +2181,16 @@ extension ConversationVC:
} }
self?.sendDataExtraction(kind: .mediaSaved(timestamp: UInt64(cellViewModel.timestampMs))) self?.sendDataExtraction(kind: .mediaSaved(timestamp: UInt64(cellViewModel.timestampMs)))
DispatchQueue.main.asyncAfter(deadline: .now() + .milliseconds(Int(ContextMenuVC.dismissDurationPartOne * 1000))) { [weak self] in
self?.viewModel.showToast( self?.viewModel.showToast(
text: "saved".localized(), text: "saved".localized(),
backgroundColor: .toast_background, backgroundColor: .toast_background,
insect: Values.largeSpacing + (self?.inputAccessoryView?.frame.height ?? 0) inset: Values.largeSpacing + (self?.inputAccessoryView?.frame.height ?? 0)
) )
} }
} }
}
func ban(_ cellViewModel: MessageViewModel) { func ban(_ cellViewModel: MessageViewModel) {
guard cellViewModel.threadVariant == .community else { return } guard cellViewModel.threadVariant == .community else { return }

Loading…
Cancel
Save