mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-29 07:42:40 +00:00
UI updates
This commit is contained in:
parent
d232105a1d
commit
311de13e0b
3 changed files with 13 additions and 10 deletions
|
@ -91,7 +91,7 @@
|
|||
<constraint firstItem="goJ-ND-Jsk" firstAttribute="top" secondItem="M84-br-bHM" secondAttribute="top" constant="20" id="ykL-gN-QoL"/>
|
||||
</constraints>
|
||||
</view>
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" dataMode="prototypes" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="co7-sG-zRv" customClass="AutosizedTableView" customModule="Riot" customModuleProvider="target">
|
||||
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" contentInsetAdjustmentBehavior="never" dataMode="prototypes" style="plain" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="1" sectionFooterHeight="1" translatesAutoresizingMaskIntoConstraints="NO" id="co7-sG-zRv" customClass="AutosizedTableView" customModule="Riot" customModuleProvider="target">
|
||||
<rect key="frame" x="0.0" y="80" width="414" height="762"/>
|
||||
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
|
||||
<connections>
|
||||
|
|
|
@ -112,9 +112,7 @@ final class RoomCreationEventsModalViewController: UIViewController {
|
|||
}
|
||||
|
||||
private func setupViews() {
|
||||
mainTableView.separatorStyle = .none
|
||||
mainTableView.tableFooterView = UIView()
|
||||
mainTableView.contentInset = UIEdgeInsets(top: 10, left: 0, bottom: 20, right: 0)
|
||||
mainTableView.contentInset = UIEdgeInsets(top: 16, left: 0, bottom: 36, right: 0)
|
||||
mainTableView.register(cellType: TextViewTableViewCell.self)
|
||||
}
|
||||
|
||||
|
|
|
@ -44,7 +44,15 @@ final class RoomCreationEventsModalViewModel: RoomCreationEventsModalViewModelTy
|
|||
func rowViewModel(at indexPath: IndexPath) -> RoomCreationEventRowViewModel? {
|
||||
let event = events[indexPath.row]
|
||||
let formatterError = UnsafeMutablePointer<MXKEventFormatterError>.allocate(capacity: 1)
|
||||
return RoomCreationEventRowViewModel(title: eventFormatter.attributedString(from: event, with: roomState, error: formatterError))
|
||||
if let string = eventFormatter.attributedString(from: event, with: roomState, error: formatterError) {
|
||||
if string.string.hasPrefix("·") {
|
||||
return RoomCreationEventRowViewModel(title: string)
|
||||
}
|
||||
let mutableString = NSMutableAttributedString(attributedString: string)
|
||||
mutableString.insert(NSAttributedString(string: "· "), at: 0)
|
||||
return RoomCreationEventRowViewModel(title: mutableString)
|
||||
}
|
||||
return RoomCreationEventRowViewModel(title: nil)
|
||||
}
|
||||
var roomName: String? {
|
||||
if let name = roomState.name, name.count > 0 {
|
||||
|
@ -92,13 +100,10 @@ final class RoomCreationEventsModalViewModel: RoomCreationEventsModalViewModelTy
|
|||
return
|
||||
}
|
||||
|
||||
if (summary.isEncrypted)
|
||||
{
|
||||
if summary.isEncrypted {
|
||||
imageView.isHidden = false
|
||||
imageView.image = EncryptionTrustLevelBadgeImageHelper.roomBadgeImage(for: summary.roomEncryptionTrustLevel())
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
imageView.isHidden = true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue