mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-30 13:16:58 +02:00
5858: Modification of the event send according to coordinate type
This commit is contained in:
@@ -18,6 +18,7 @@ import Foundation
|
||||
import SwiftUI
|
||||
import Combine
|
||||
import CoreLocation
|
||||
import MatrixSDK
|
||||
|
||||
enum LocationSharingViewAction {
|
||||
case cancel
|
||||
@@ -28,7 +29,7 @@ enum LocationSharingViewAction {
|
||||
|
||||
enum LocationSharingViewModelResult {
|
||||
case cancel
|
||||
case share(latitude: Double, longitude: Double)
|
||||
case share(latitude: Double, longitude: Double, coordinateType: MXEventAssetType)
|
||||
}
|
||||
|
||||
enum LocationSharingViewError {
|
||||
@@ -47,8 +48,8 @@ struct LocationSharingViewState: BindableState {
|
||||
/// Current user avatarData
|
||||
let userAvatarData: AvatarInputProtocol
|
||||
|
||||
/// User map annotation to display existing location
|
||||
let userAnnotation: UserLocationAnnotation?
|
||||
/// Shared annotation to display existing location
|
||||
let sharedAnnotation: UserLocationAnnotation?
|
||||
|
||||
/// Map annotations to display on map
|
||||
var annotations: [UserLocationAnnotation]
|
||||
@@ -74,7 +75,7 @@ struct LocationSharingViewState: BindableState {
|
||||
}
|
||||
|
||||
var displayExistingLocation: Bool {
|
||||
return userAnnotation != nil
|
||||
return sharedAnnotation != nil
|
||||
}
|
||||
|
||||
var shareButtonEnabled: Bool {
|
||||
|
||||
Reference in New Issue
Block a user