diff --git a/Config/BuildSettings.swift b/Config/BuildSettings.swift index 1537ef8ed..cccba278d 100644 --- a/Config/BuildSettings.swift +++ b/Config/BuildSettings.swift @@ -427,6 +427,6 @@ final class BuildSettings: NSObject { } // Do not enable live location sharing atm - return true + return false } } diff --git a/Riot/Modules/Room/Location/LocationMarkerView.xib b/Riot/Modules/Room/Location/LocationMarkerView.xib index 2b855435e..fb09fd4be 100644 --- a/Riot/Modules/Room/Location/LocationMarkerView.xib +++ b/Riot/Modules/Room/Location/LocationMarkerView.xib @@ -10,11 +10,11 @@ - + - + @@ -22,7 +22,7 @@ - + @@ -30,22 +30,33 @@ - + + + + + - - - - - - + + + + + + + + + + + + + diff --git a/Riot/Modules/Room/Location/RoomTimelineLocationView.swift b/Riot/Modules/Room/Location/RoomTimelineLocationView.swift index 29633d9c6..e467a8242 100644 --- a/Riot/Modules/Room/Location/RoomTimelineLocationView.swift +++ b/Riot/Modules/Room/Location/RoomTimelineLocationView.swift @@ -276,12 +276,19 @@ class RoomTimelineLocationView: UIView, NibLoadable, Themable, MGLMapViewDelegat } } - return LiveLocationBannerViewData(placeholderIcon: placeholderIcon, iconTint: iconTint, title: title, titleColor: titleColor, timeLeftString: timeLeftString, rightButtonTitle: rightButtonTitle, rightButtonTag: rightButtonTag, coordinate: liveCoordinate) + return LiveLocationBannerViewData(placeholderIcon: placeholderIcon, + iconTint: iconTint, + title: title, + titleColor: titleColor, + timeLeftString: timeLeftString, + rightButtonTitle: rightButtonTitle, + rightButtonTag: rightButtonTag, + coordinate: liveCoordinate) } private func generateTimerString(for timestamp: Double, isIncomingLocation: Bool) -> String? { - let timerInSec = timestamp / 1000 // Timestamp is in millisecond in the SDK + let timerInSec = timestamp let timerString: String? if isIncomingLocation { timerString = VectorL10n.locationSharingLiveTimerIncoming(incomingTimerFormatter.string(from: Date(timeIntervalSince1970: timerInSec))) diff --git a/Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/Location/LocationPlainCell.swift b/Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/Location/LocationPlainCell.swift index f817d7529..40f59eb50 100644 --- a/Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/Location/LocationPlainCell.swift +++ b/Riot/Modules/Room/TimelineCells/Styles/Plain/Cells/Location/LocationPlainCell.swift @@ -92,7 +92,7 @@ class LocationPlainCell: SizableBaseRoomCell, RoomCellReactionsDisplayable, Room liveLocationStatus = .stopped } else if let lastBeacon = beaconInfoSummary.lastBeacon { - let expiryTimeinterval = TimeInterval(beaconInfoSummary.expiryTimestamp/1000) + let expiryTimeinterval = TimeInterval(beaconInfoSummary.expiryTimestamp/1000) // Timestamp is in millisecond in the SDK let coordinate = CLLocationCoordinate2D(latitude: lastBeacon.location.latitude, longitude: lastBeacon.location.longitude) @@ -102,9 +102,9 @@ class LocationPlainCell: SizableBaseRoomCell, RoomCellReactionsDisplayable, Room } if beaconInfoSummary.userId == bubbleData.mxSession.myUserId { - viewState = .incoming(liveLocationStatus) - } else { viewState = .outgoing(liveLocationStatus) + } else { + viewState = .incoming(liveLocationStatus) } return viewState