mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-17 23:18:27 +02:00
Removed adress label and enabled multiline for room names
This commit is contained in:
@@ -701,5 +701,8 @@ class BWIBuildSettings: NSObject {
|
||||
|
||||
// MARK: Backup restore
|
||||
var enableRestoreKeysFromBackup = true
|
||||
|
||||
// MARK: Backup restore
|
||||
var showMatrixIDinRoomInfoScreen = false
|
||||
|
||||
}
|
||||
|
||||
@@ -132,15 +132,21 @@ class RoomInfoBasicView: UIView {
|
||||
}
|
||||
|
||||
pillImageView?.image = federationBadgeImage()
|
||||
roomNameLabel.numberOfLines = 2
|
||||
roomNameLabel.attributedText = roomNameWithFederationPill(roomDisplayName: viewData.roomDisplayName, font: roomNameLabel.font)
|
||||
} else {
|
||||
roomNameLabel.text = viewData.roomDisplayName
|
||||
}
|
||||
|
||||
roomNameLabel.numberOfLines = 0
|
||||
|
||||
badgeImageView.image = nil
|
||||
roomAddressLabel.text = viewData.mainRoomAlias
|
||||
roomAddressLabel.isHidden = roomAddressLabel.text?.isEmpty ?? true
|
||||
if BWIBuildSettings.shared.showMatrixIDinRoomInfoScreen {
|
||||
roomAddressLabel.text = viewData.mainRoomAlias
|
||||
roomAddressLabel.isHidden = roomAddressLabel.text?.isEmpty ?? true
|
||||
} else {
|
||||
roomAddressLabel.text = nil
|
||||
roomAddressLabel.isHidden = true
|
||||
}
|
||||
roomTopicTextView.text = viewData.roomTopic
|
||||
topicContainerView.isHidden = roomTopicTextView.text?.isEmpty ?? true
|
||||
securityTitleLabel.text = VectorL10n.securitySettingsTitle
|
||||
@@ -153,6 +159,7 @@ class RoomInfoBasicView: UIView {
|
||||
} else {
|
||||
presenceIndicatorView.stopListeningPresenceUpdates()
|
||||
}
|
||||
updateRoomNameLabelPosition()
|
||||
updateBadgeImageViewPosition(isPresenceDisplayed: viewData.directUserPresence != .unknown)
|
||||
}
|
||||
|
||||
@@ -196,6 +203,13 @@ class RoomInfoBasicView: UIView {
|
||||
return attributedString
|
||||
}
|
||||
|
||||
// bwi
|
||||
private func updateRoomNameLabelPosition() {
|
||||
let margins = self.layoutMarginsGuide
|
||||
roomNameLabel.leadingAnchor.constraint(equalTo: margins.leadingAnchor).isActive = true
|
||||
roomNameLabel.trailingAnchor.constraint(equalTo: margins.trailingAnchor).isActive = true
|
||||
}
|
||||
|
||||
private func updateBadgeImageViewPosition(isPresenceDisplayed: Bool) {
|
||||
guard badgeImageView.image != nil else {
|
||||
badgeImageView.isHidden = true
|
||||
@@ -263,6 +277,7 @@ extension RoomInfoBasicView: Themable {
|
||||
|
||||
extension RoomInfoBasicView: PresenceIndicatorViewDelegate {
|
||||
func presenceIndicatorViewDidUpdateVisibility(_ presenceIndicatorView: PresenceIndicatorView, isHidden: Bool) {
|
||||
updateRoomNameLabelPosition()
|
||||
updateBadgeImageViewPosition(isPresenceDisplayed: !isHidden)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
</constraints>
|
||||
</view>
|
||||
<stackView opaque="NO" contentMode="scaleToFill" spacing="4" translatesAutoresizingMaskIntoConstraints="NO" id="Qyv-Da-RCF">
|
||||
<rect key="frame" x="142" y="97" width="78" height="24"/>
|
||||
<rect key="frame" x="169" y="97" width="24" height="24"/>
|
||||
<subviews>
|
||||
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="CPx-Kp-81p">
|
||||
<rect key="frame" x="0.0" y="0.0" width="24" height="24"/>
|
||||
@@ -80,19 +80,16 @@
|
||||
<constraint firstAttribute="width" constant="24" id="xNQ-sH-hA2"/>
|
||||
</constraints>
|
||||
</imageView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ekk-PI-fnh">
|
||||
<rect key="frame" x="28" y="0.0" width="50" height="24"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
</subviews>
|
||||
<constraints>
|
||||
<constraint firstAttribute="height" relation="greaterThanOrEqual" constant="24" id="Bus-PH-DBv"/>
|
||||
</constraints>
|
||||
</stackView>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" ambiguous="YES" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ekk-PI-fnh">
|
||||
<rect key="frame" x="156" y="129" width="50" height="0.0"/>
|
||||
<fontDescription key="fontDescription" type="system" weight="semibold" pointSize="20"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
</label>
|
||||
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" ambiguous="YES" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yjw-ez-u4W">
|
||||
<rect key="frame" x="161.5" y="129" width="39.5" height="22"/>
|
||||
<rect key="frame" x="161.5" y="137" width="39.5" height="14"/>
|
||||
<fontDescription key="fontDescription" type="system" pointSize="16"/>
|
||||
<nil key="textColor"/>
|
||||
<nil key="highlightedColor"/>
|
||||
|
||||
Reference in New Issue
Block a user