mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Update polls icons (#2163)
* Add new polls icons * Fix preview tests * Update UI tests * Add polls reply view test
This commit is contained in:
@@ -80,7 +80,7 @@ struct TimelineReplyView: View {
|
||||
ReplyView(sender: sender,
|
||||
plainBody: question,
|
||||
formattedBody: nil,
|
||||
icon: .init(kind: .iconAsset(Asset.Images.timelinePoll), cornerRadii: iconCornerRadii))
|
||||
icon: .init(kind: .iconAsset(Asset.Images.polls), cornerRadii: iconCornerRadii))
|
||||
}
|
||||
default:
|
||||
LoadingReplyView()
|
||||
@@ -112,7 +112,7 @@ struct TimelineReplyView: View {
|
||||
case iconAsset(ImageAsset)
|
||||
case icon(KeyPath<CompoundIcons, Image>)
|
||||
}
|
||||
|
||||
|
||||
let kind: Kind
|
||||
let cornerRadii: Double
|
||||
}
|
||||
@@ -292,7 +292,10 @@ struct TimelineReplyView_Previews: PreviewProvider, TestablePreview {
|
||||
eventContent: .message(.notice(.init(body: "", formattedBody: attributedStringWithMention))))),
|
||||
TimelineReplyView(placement: .timeline,
|
||||
timelineItemReplyDetails: .loaded(sender: .init(id: "", displayName: "Bob"),
|
||||
eventContent: .message(.notice(.init(body: "", formattedBody: attributedStringWithAtRoomMention)))))
|
||||
eventContent: .message(.notice(.init(body: "", formattedBody: attributedStringWithAtRoomMention))))),
|
||||
TimelineReplyView(placement: .timeline,
|
||||
timelineItemReplyDetails: .loaded(sender: .init(id: "", displayName: "Bob"),
|
||||
eventContent: .poll(question: "Do you like polls?")))
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ struct PollRoomTimelineView: View {
|
||||
|
||||
private var questionView: some View {
|
||||
HStack(alignment: .top, spacing: 12) {
|
||||
let asset = poll.hasEnded ? Asset.Images.timelineEndedPoll : Asset.Images.timelinePoll
|
||||
let asset = poll.hasEnded ? Asset.Images.pollsEnd : Asset.Images.polls
|
||||
|
||||
Image(asset.name)
|
||||
.resizable()
|
||||
|
||||
@@ -121,7 +121,7 @@ enum TimelineItemMenuAction: Identifiable, Hashable {
|
||||
case .react:
|
||||
Label(L10n.actionReact, iconAsset: Asset.Images.addReaction)
|
||||
case .endPoll:
|
||||
Label(L10n.actionEndPoll, iconAsset: Asset.Images.endedPoll)
|
||||
Label(L10n.actionEndPoll, iconAsset: Asset.Images.pollsEnd)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user