Implement toast messages when links are copied

This commit is contained in:
ismailgulek
2022-01-06 02:41:57 +03:00
parent 02de9c5c34
commit addb8bf722
6 changed files with 42 additions and 21 deletions
@@ -158,6 +158,8 @@ final class ThreadListViewController: UIViewController {
renderShowingLongPressActions()
case .share(let string):
renderShare(string)
case .toastForCopyLink:
toastForCopyLink()
case .error(let error):
render(error: error)
}
@@ -256,6 +258,11 @@ final class ThreadListViewController: UIViewController {
present(activityVC, animated: true, completion: nil)
}
private func toastForCopyLink() {
view.vc_toast(message: VectorL10n.roomEventCopyLinkInfo,
image: Asset.Images.linkIcon.image)
}
private func render(error: Error) {
self.activityPresenter.removeCurrentActivityIndicator(animated: true)
self.errorPresenter.presentError(from: self, forError: error, animated: true, handler: nil)