Selaa lähdekoodia

Start Google Meet instant meeting from New Instant Meet.

Clicking the New Instant Meet card now opens https://meet.google.com/new in the default browser.

Made-with: Cursor
huzaifahayat12 1 viikko sitten
vanhempi
commit
d0a20dd7c3
1 muutettua tiedostoa jossa 8 lisäystä ja 0 poistoa
  1. 8 0
      meetings_app/ViewController.swift

+ 8 - 0
meetings_app/ViewController.swift

@@ -259,6 +259,11 @@ private extension ViewController {
259
         openInAppBrowser(with: url, policy: inAppBrowserDefaultPolicy)
259
         openInAppBrowser(with: url, policy: inAppBrowserDefaultPolicy)
260
     }
260
     }
261
 
261
 
262
+    @objc private func instantMeetClicked(_ sender: NSClickGestureRecognizer) {
263
+        guard let url = URL(string: "https://meet.google.com/new") else { return }
264
+        openInDefaultBrowser(url: url)
265
+    }
266
+
262
     private func normalizedURLString(from value: String) -> String {
267
     private func normalizedURLString(from value: String) -> String {
263
         if value.lowercased().hasPrefix("http://") || value.lowercased().hasPrefix("https://") {
268
         if value.lowercased().hasPrefix("http://") || value.lowercased().hasPrefix("https://") {
264
             return value
269
             return value
@@ -1016,6 +1021,9 @@ private extension ViewController {
1016
         instant.onHoverChanged?(false)
1021
         instant.onHoverChanged?(false)
1017
         codeCard.onHoverChanged?(false)
1022
         codeCard.onHoverChanged?(false)
1018
 
1023
 
1024
+        let instantClick = NSClickGestureRecognizer(target: self, action: #selector(instantMeetClicked(_:)))
1025
+        instant.addGestureRecognizer(instantClick)
1026
+
1019
         row.addArrangedSubview(instant)
1027
         row.addArrangedSubview(instant)
1020
         row.addArrangedSubview(codeCard)
1028
         row.addArrangedSubview(codeCard)
1021
         return row
1029
         return row