Skip to content

Commit

Permalink
Merge branch 'develop' into verify-echo-fallback-to-org
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-lsvk committed Aug 8, 2023
2 parents 5a50221 + afde39a commit 0c794f4
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,23 @@ final class Web3InboxViewController: UIViewController {
view = Web3Inbox.instance.getWebView()

let refresh = UIBarButtonItem(barButtonSystemItem: .refresh, target: self, action: #selector(refreshTapped))
navigationItem.rightBarButtonItem = refresh
let getUrl = UIBarButtonItem(barButtonSystemItem: .compose, target: self, action: #selector(getUrlPressed))

navigationItem.rightBarButtonItems = [refresh, getUrl]
}

@objc func refreshTapped() {
webView?.reload()
}

@objc func getUrlPressed(_ sender: UIBarItem) {
UIPasteboard.general.string = webView?.url?.absoluteString

let alert = UIAlertController(title: "URL copied to clipboard", message: nil, preferredStyle: .alert)
let action = UIAlertAction(title: "OK", style: .cancel)
alert.addAction(action)
present(alert, animated: true)
}
}


Expand Down

0 comments on commit 0c794f4

Please sign in to comment.