add feedback for actions directly from long press menu

pull/1061/head
Ryan ZHAO 8 months ago
parent 95d5efd19e
commit 6f8c8a7e9f

@ -1986,6 +1986,11 @@ extension ConversationVC:
UIPasteboard.general.setData(data, forPasteboardType: type.identifier)
}
self.viewModel.showToast(
text: "copied".localized(),
backgroundColor: .toast_background,
insect: Values.largeSpacing + (self.inputAccessoryView?.frame.height ?? 0)
)
}
func copySessionID(_ cellViewModel: MessageViewModel) {
@ -1994,6 +1999,11 @@ extension ConversationVC:
}
UIPasteboard.general.string = cellViewModel.authorId
self.viewModel.showToast(
text: "copied".localized(),
backgroundColor: .toast_background,
insect: Values.largeSpacing + (self.inputAccessoryView?.frame.height ?? 0)
)
}
func delete(_ cellViewModel: MessageViewModel, using dependencies: Dependencies) {
@ -2354,6 +2364,11 @@ extension ConversationVC:
}
self?.sendDataExtraction(kind: .mediaSaved(timestamp: UInt64(cellViewModel.timestampMs)))
self?.viewModel.showToast(
text: "saved".localized(),
backgroundColor: .toast_background,
insect: Values.largeSpacing + (self?.inputAccessoryView?.frame.height ?? 0)
)
}
}

@ -451,6 +451,7 @@ final class InputView: UIView, InputViewButtonDelegate, InputTextViewDelegate, M
inputTextView.resignFirstResponder()
}
@discardableResult
override func becomeFirstResponder() -> Bool {
inputTextView.becomeFirstResponder()
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save