mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-05 23:47:44 +02:00
6077: Some adjustment and fix
This commit is contained in:
@@ -10,11 +10,11 @@
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view contentMode="scaleToFill" insetsLayoutMarginsFromSafeArea="NO" id="iN0-l3-epB" customClass="LocationMarkerView" customModule="Riot" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="0.0" width="42" height="46"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="42" height="85"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="location_user_marker" translatesAutoresizingMaskIntoConstraints="NO" id="ldO-kc-R5W">
|
||||
<rect key="frame" x="0.0" y="0.5" width="42" height="45"/>
|
||||
<rect key="frame" x="0.0" y="0.0" width="42" height="45"/>
|
||||
<color key="tintColor" red="0.050980392159999999" green="0.74117647060000003" blue="0.5450980392" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="42" id="R2b-uu-zTh"/>
|
||||
@@ -22,7 +22,7 @@
|
||||
</constraints>
|
||||
</imageView>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="location_marker_icon" translatesAutoresizingMaskIntoConstraints="NO" id="gQe-Hv-22e">
|
||||
<rect key="frame" x="9" y="9" width="24" height="24"/>
|
||||
<rect key="frame" x="9" y="9.5" width="24" height="24"/>
|
||||
<color key="tintColor" red="1" green="1" blue="1" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="width" constant="24" id="XuF-VU-qG2"/>
|
||||
@@ -30,22 +30,33 @@
|
||||
</constraints>
|
||||
</imageView>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="qut-wn-BX3" customClass="UserAvatarView" customModule="Riot" customModuleProvider="target">
|
||||
<rect key="frame" x="3" y="4" width="36" height="36"/>
|
||||
<rect key="frame" x="3" y="3.5" width="36" height="36"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" constant="36" id="BjG-I5-n8f"/>
|
||||
<constraint firstAttribute="width" constant="36" id="W3F-Aw-FO3"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="KWg-z1-qEd" userLabel="Offset View">
|
||||
<rect key="frame" x="0.0" y="45" width="42" height="40"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
</view>
|
||||
</subviews>
|
||||
<color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
|
||||
<constraints>
|
||||
<constraint firstItem="ldO-kc-R5W" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="6Ih-un-Opb"/>
|
||||
<constraint firstItem="ldO-kc-R5W" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="8ex-ce-7JP"/>
|
||||
<constraint firstItem="gQe-Hv-22e" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="VE9-WY-CvF"/>
|
||||
<constraint firstItem="qut-wn-BX3" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="Y4M-u0-fTL"/>
|
||||
<constraint firstItem="gQe-Hv-22e" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" constant="-2" id="eMd-85-1X6"/>
|
||||
<constraint firstItem="qut-wn-BX3" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" constant="-1" id="jar-84-78F"/>
|
||||
<constraint firstItem="KWg-z1-qEd" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="0py-1i-Gdf"/>
|
||||
<constraint firstItem="ldO-kc-R5W" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="5a8-E1-MIa"/>
|
||||
<constraint firstAttribute="trailing" secondItem="ldO-kc-R5W" secondAttribute="trailing" id="Lln-IS-hLl"/>
|
||||
<constraint firstItem="qut-wn-BX3" firstAttribute="centerX" secondItem="ldO-kc-R5W" secondAttribute="centerX" id="TUG-aN-usd"/>
|
||||
<constraint firstItem="KWg-z1-qEd" firstAttribute="height" secondItem="ldO-kc-R5W" secondAttribute="height" constant="-5" id="TlE-3X-R0r"/>
|
||||
<constraint firstItem="KWg-z1-qEd" firstAttribute="top" secondItem="ldO-kc-R5W" secondAttribute="bottom" id="WYZ-ob-djk"/>
|
||||
<constraint firstAttribute="bottom" secondItem="KWg-z1-qEd" secondAttribute="bottom" id="Zze-LI-fsw"/>
|
||||
<constraint firstItem="gQe-Hv-22e" firstAttribute="centerY" secondItem="ldO-kc-R5W" secondAttribute="centerY" constant="-1" id="a7A-n2-rUT"/>
|
||||
<constraint firstAttribute="trailing" secondItem="KWg-z1-qEd" secondAttribute="trailing" id="ayz-pJ-gK1"/>
|
||||
<constraint firstItem="KWg-z1-qEd" firstAttribute="width" secondItem="ldO-kc-R5W" secondAttribute="width" id="hy9-K6-5Ss"/>
|
||||
<constraint firstItem="gQe-Hv-22e" firstAttribute="centerX" secondItem="ldO-kc-R5W" secondAttribute="centerX" id="iSa-mh-J7b"/>
|
||||
<constraint firstItem="ldO-kc-R5W" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="vFi-tw-CqT"/>
|
||||
<constraint firstItem="qut-wn-BX3" firstAttribute="centerY" secondItem="ldO-kc-R5W" secondAttribute="centerY" constant="-1" id="xoi-mp-qC5"/>
|
||||
</constraints>
|
||||
<nil key="simulatedTopBarMetrics"/>
|
||||
<nil key="simulatedBottomBarMetrics"/>
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user