mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 21:39:12 +00:00
tweaks for the RC
This commit is contained in:
parent
d88440dda4
commit
1a3378f6d3
@ -63,10 +63,13 @@ struct PinnedItemsBannerView: View {
|
|||||||
|
|
||||||
private var content: some View {
|
private var content: some View {
|
||||||
VStack(alignment: .leading, spacing: 0) {
|
VStack(alignment: .leading, spacing: 0) {
|
||||||
Text(state.bannerIndicatorDescription)
|
// Only the display the indicator description for more than 1 pinned item
|
||||||
.font(.compound.bodySM)
|
if state.count > 1 {
|
||||||
.foregroundColor(.compound.textActionAccent)
|
Text(state.bannerIndicatorDescription)
|
||||||
.lineLimit(1)
|
.font(.compound.bodySM)
|
||||||
|
.foregroundColor(.compound.textActionAccent)
|
||||||
|
.lineLimit(1)
|
||||||
|
}
|
||||||
Text(state.displayedMessage)
|
Text(state.displayedMessage)
|
||||||
.font(.compound.bodyMD)
|
.font(.compound.bodyMD)
|
||||||
.foregroundColor(.compound.textPrimary)
|
.foregroundColor(.compound.textPrimary)
|
||||||
|
@ -308,8 +308,12 @@ class TimelineTableViewController: UIViewController {
|
|||||||
guard let dataSource else { return }
|
guard let dataSource else { return }
|
||||||
|
|
||||||
var snapshot = NSDiffableDataSourceSnapshot<TimelineSection, String>()
|
var snapshot = NSDiffableDataSourceSnapshot<TimelineSection, String>()
|
||||||
snapshot.appendSections([.typingIndicator])
|
|
||||||
snapshot.appendItems([TimelineTypingIndicatorCell.reuseIdentifier])
|
// We don't want to display the typing notification in this timeline
|
||||||
|
if !coordinator.context.viewState.isPinnedEventsTimeline {
|
||||||
|
snapshot.appendSections([.typingIndicator])
|
||||||
|
snapshot.appendItems([TimelineTypingIndicatorCell.reuseIdentifier])
|
||||||
|
}
|
||||||
snapshot.appendSections([.main])
|
snapshot.appendSections([.main])
|
||||||
snapshot.appendItems(timelineItemsIDs)
|
snapshot.appendItems(timelineItemsIDs)
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ enum TimelineItemMenuAction: Identifiable, Hashable {
|
|||||||
|
|
||||||
var canAppearInPinnedEventsTimeline: Bool {
|
var canAppearInPinnedEventsTimeline: Bool {
|
||||||
switch self {
|
switch self {
|
||||||
case .viewInRoomTimeline, .pin, .unpin, .forward, .redact:
|
case .viewInRoomTimeline, .pin, .unpin, .forward:
|
||||||
return true
|
return true
|
||||||
default:
|
default:
|
||||||
return false
|
return false
|
||||||
|
@ -58,14 +58,14 @@ struct TimelineItemMenuActionProvider {
|
|||||||
if item.isForwardable {
|
if item.isForwardable {
|
||||||
actions.append(.forward(itemID: item.id))
|
actions.append(.forward(itemID: item.id))
|
||||||
}
|
}
|
||||||
|
|
||||||
if canCurrentUserPin, let eventID = item.id.eventID {
|
|
||||||
actions.append(pinnedEventIDs.contains(eventID) ? .unpin : .pin)
|
|
||||||
}
|
|
||||||
|
|
||||||
if item.isEditable {
|
if item.isEditable {
|
||||||
actions.append(.edit)
|
actions.append(.edit)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if canCurrentUserPin, let eventID = item.id.eventID {
|
||||||
|
actions.append(pinnedEventIDs.contains(eventID) ? .unpin : .pin)
|
||||||
|
}
|
||||||
|
|
||||||
if item.isCopyable {
|
if item.isCopyable {
|
||||||
actions.append(.copy)
|
actions.append(.copy)
|
||||||
|
@ -102,7 +102,9 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
|
|||||||
context.send(viewAction: .displayTimelineItemMenu(itemID: timelineItem.id))
|
context.send(viewAction: .displayTimelineItemMenu(itemID: timelineItem.id))
|
||||||
}
|
}
|
||||||
|
|
||||||
if !timelineItem.properties.reactions.isEmpty {
|
// Do not display reactions in the pinned events timeline
|
||||||
|
if !context.viewState.isPinnedEventsTimeline,
|
||||||
|
!timelineItem.properties.reactions.isEmpty {
|
||||||
TimelineReactionsView(context: context,
|
TimelineReactionsView(context: context,
|
||||||
itemID: timelineItem.id,
|
itemID: timelineItem.id,
|
||||||
reactions: timelineItem.properties.reactions,
|
reactions: timelineItem.properties.reactions,
|
||||||
|
BIN
PreviewTests/Sources/__Snapshots__/PreviewTests/test_pinnedItemsBannerView-iPad-en-GB.1.png
(Stored with Git LFS)
BIN
PreviewTests/Sources/__Snapshots__/PreviewTests/test_pinnedItemsBannerView-iPad-en-GB.1.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/Sources/__Snapshots__/PreviewTests/test_pinnedItemsBannerView-iPad-pseudo.1.png
(Stored with Git LFS)
BIN
PreviewTests/Sources/__Snapshots__/PreviewTests/test_pinnedItemsBannerView-iPad-pseudo.1.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/Sources/__Snapshots__/PreviewTests/test_pinnedItemsBannerView-iPhone-15-en-GB.1.png
(Stored with Git LFS)
BIN
PreviewTests/Sources/__Snapshots__/PreviewTests/test_pinnedItemsBannerView-iPhone-15-en-GB.1.png
(Stored with Git LFS)
Binary file not shown.
BIN
PreviewTests/Sources/__Snapshots__/PreviewTests/test_pinnedItemsBannerView-iPhone-15-pseudo.1.png
(Stored with Git LFS)
BIN
PreviewTests/Sources/__Snapshots__/PreviewTests/test_pinnedItemsBannerView-iPhone-15-pseudo.1.png
(Stored with Git LFS)
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user