Sfoglia il codice sorgente

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 settimana fa
parent
commit
d0a20dd7c3
1 ha cambiato i file con 8 aggiunte e 0 eliminazioni
  1. 8 0
      meetings_app/ViewController.swift

+ 8 - 0
meetings_app/ViewController.swift

@@ -259,6 +259,11 @@ private extension ViewController {
259 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 267
     private func normalizedURLString(from value: String) -> String {
263 268
         if value.lowercased().hasPrefix("http://") || value.lowercased().hasPrefix("https://") {
264 269
             return value
@@ -1016,6 +1021,9 @@ private extension ViewController {
1016 1021
         instant.onHoverChanged?(false)
1017 1022
         codeCard.onHoverChanged?(false)
1018 1023
 
1024
+        let instantClick = NSClickGestureRecognizer(target: self, action: #selector(instantMeetClicked(_:)))
1025
+        instant.addGestureRecognizer(instantClick)
1026
+
1019 1027
         row.addArrangedSubview(instant)
1020 1028
         row.addArrangedSubview(codeCard)
1021 1029
         return row