-
Notifications
You must be signed in to change notification settings - Fork 502
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Location Sharing]: Pin drop location sharing #5957
Conversation
📱 Scan the QR code below to install the build for this PR. If you can't scan the QR code you can install the build via this link: https://i.diawi.com/kn5pYZ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
switch userLocationAnnotation.coordinateType { | ||
case .user: | ||
self.addUserMarkerView(with: userLocationAnnotation.avatarData) | ||
case .pin, .generic: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be interesting to create a PinLocationAnnotation
and init(pinLocationAnnotation: PinLocationAnnotation)
@@ -19,14 +19,23 @@ import SwiftUI | |||
import Combine | |||
import CoreLocation | |||
|
|||
// This is the equivalent of MXEventAssetType in the MatrixSDK | |||
enum LocationSharingCoordinateType { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can make just 2 cases in the app side. case pin, case user
. As you will not handle generic case in your screens.
|
||
self.coordinate = coordinate | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to create the intermediate class PinLocationAnnotation: LocationAnnotation
. UserLocationAnnotation
can be casted as LocationAnnotation
and if we add a new kind of annotation like POIAnnotation
we will not be able to distinct them.
Requires matrix-org/matrix-ios-sdk#1428
Fix: #5858
Light theme:
Dark theme: