Skip to content
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

Merged
merged 7 commits into from
Apr 4, 2022

Conversation

MaximeEvrard42
Copy link
Contributor

@MaximeEvrard42 MaximeEvrard42 commented Mar 31, 2022

Requires matrix-org/matrix-ios-sdk#1428
Fix: #5858

Light theme:
Simulator Screen Shot - iPhone 8 Plus - 2022-03-31 at 17 14 47
Simulator Screen Shot - iPhone 8 Plus - 2022-03-31 at 17 14 53
Simulator Screen Shot - iPhone 8 Plus - 2022-03-31 at 17 15 05

Dark theme:
Simulator Screen Shot - iPhone 11 Pro - 2022-03-31 at 17 17 15
Simulator Screen Shot - iPhone 11 Pro - 2022-03-31 at 17 17 21
Simulator Screen Shot - iPhone 11 Pro - 2022-03-31 at 17 17 35

@github-actions
Copy link

github-actions bot commented Mar 31, 2022

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/kn5pYZ

@MaximeEvrard42 MaximeEvrard42 requested a review from gaelledel April 1, 2022 07:43
Copy link

@gaelledel gaelledel left a 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:
Copy link
Contributor

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 {
Copy link
Contributor

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
}
}

Copy link
Contributor

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.

@MaximeEvrard42 MaximeEvrard42 merged commit 1d17a42 into develop Apr 4, 2022
@MaximeEvrard42 MaximeEvrard42 deleted the maximee/5858_pin_drop_sharing branch April 4, 2022 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Location sharing] Pin drop UI and action
3 participants