5858: Factorise some code according to PR comments

This commit is contained in:
MaximeE
2022-04-04 16:33:55 +02:00
parent 540ca3e7f3
commit dae1109a59
7 changed files with 52 additions and 42 deletions
@@ -33,14 +33,12 @@ extension MXEventAssetType {
func locationSharingCoordinateType() -> LocationSharingCoordinateType {
let coordinateType: LocationSharingCoordinateType
switch self {
case .user:
case .user, .generic:
coordinateType = .user
case .pin:
coordinateType = .pin
case .generic:
coordinateType = .generic
@unknown default:
coordinateType = .generic
coordinateType = .user
}
return coordinateType
}
@@ -54,8 +52,6 @@ extension LocationSharingCoordinateType {
eventAssetType = .user
case .pin:
eventAssetType = .pin
case .generic:
eventAssetType = .generic
}
return eventAssetType
}