Refine polls UI in the timeline (#1474)

* Add summary view in PollRoomTimelineView

* Add selectedPollOption action

* Handle undisclosed polls

* Add more logics in PollRoomTimelineView

* Refine ended poll UI

* Refine poll layout

* More UI refinements

* Fix layout issue

* Refine progress bar

* Add poll mocks and UI tests

* Cleanup
This commit is contained in:
Alfonso Grillo
2023-08-11 12:25:16 +02:00
committed by GitHub
parent f64159670b
commit 25f66d2557
27 changed files with 465 additions and 144 deletions
+1 -1
View File
@@ -41,8 +41,8 @@ internal enum Asset {
internal static let locationPin = ImageAsset(name: "images/location-pin")
internal static let locationPointerFull = ImageAsset(name: "images/location-pointer-full")
internal static let locationPointer = ImageAsset(name: "images/location-pointer")
internal static let equalizer = ImageAsset(name: "images/equalizer")
internal static let timelineComposerSendMessage = ImageAsset(name: "images/timeline-composer-send-message")
internal static let timelinePoll = ImageAsset(name: "images/timeline-poll")
internal static let timelineReactionAddMore = ImageAsset(name: "images/timeline-reaction-add-more")
internal static let waitingGradient = ImageAsset(name: "images/waiting-gradient")
}
+10
View File
@@ -208,6 +208,16 @@ public enum L10n {
public static var commonPeople: String { return L10n.tr("Localizable", "common_people") }
/// Permalink
public static var commonPermalink: String { return L10n.tr("Localizable", "common_permalink") }
/// Final votes: %1$@
public static func commonPollFinalVotes(_ p1: Any) -> String {
return L10n.tr("Localizable", "common_poll_final_votes", String(describing: p1))
}
/// Total votes: %1$@
public static func commonPollTotalVotes(_ p1: Any) -> String {
return L10n.tr("Localizable", "common_poll_total_votes", String(describing: p1))
}
/// Results will show after the poll has ended
public static var commonPollUndisclosedText: String { return L10n.tr("Localizable", "common_poll_undisclosed_text") }
/// Plural format key: "%#@COUNT@"
public static func commonPollVotesCount(_ p1: Int) -> String {
return L10n.tr("Localizable", "common_poll_votes_count", p1)