diff --git a/Riot/Modules/Room/RoomCoordinator.swift b/Riot/Modules/Room/RoomCoordinator.swift index 254b3a1659..17603678c1 100644 --- a/Riot/Modules/Room/RoomCoordinator.swift +++ b/Riot/Modules/Room/RoomCoordinator.swift @@ -92,8 +92,7 @@ final class RoomCoordinator: NSObject, RoomCoordinatorProtocol { self.roomViewController.parentSpaceId = parameters.parentSpaceId - // Tchap: Disable Polls -// TimelinePollProvider.shared.session = parameters.session + TimelinePollProvider.shared.session = parameters.session VoiceBroadcastPlaybackProvider.shared.session = parameters.session VoiceBroadcastRecorderProvider.shared.session = parameters.session @@ -478,23 +477,22 @@ final class RoomCoordinator: NSObject, RoomCoordinatorProtocol { // } private func startEditPollCoordinator(startEvent: MXEvent? = nil) { - // Tchap: Feature unavailable -// let parameters = PollEditFormCoordinatorParameters(room: roomViewController.roomDataSource.room, pollStartEvent: startEvent) -// let coordinator = PollEditFormCoordinator(parameters: parameters) -// -// coordinator.completion = { [weak self, weak coordinator] in -// guard let self = self, let coordinator = coordinator else { -// return -// } -// -// self.navigationRouter?.dismissModule(animated: true, completion: nil) -// self.remove(childCoordinator: coordinator) -// } -// -// add(childCoordinator: coordinator) -// -// navigationRouter?.present(coordinator, animated: true) -// coordinator.start() + let parameters = PollEditFormCoordinatorParameters(room: roomViewController.roomDataSource.room, pollStartEvent: startEvent) + let coordinator = PollEditFormCoordinator(parameters: parameters) + + coordinator.completion = { [weak self, weak coordinator] in + guard let self = self, let coordinator = coordinator else { + return + } + + self.navigationRouter?.dismissModule(animated: true, completion: nil) + self.remove(childCoordinator: coordinator) + } + + add(childCoordinator: coordinator) + + navigationRouter?.present(coordinator, animated: true) + coordinator.start() } private func startLoading() { @@ -650,20 +648,19 @@ extension RoomCoordinator: RoomViewControllerDelegate { } func roomViewController(_ roomViewController: RoomViewController, canEndPollWithEventIdentifier eventIdentifier: String) -> Bool { - return /*TimelinePollProvider.shared.timelinePollCoordinatorForEventIdentifier(eventIdentifier)?.canEndPoll() ??*/ false + return TimelinePollProvider.shared.timelinePollCoordinatorForEventIdentifier(eventIdentifier)?.canEndPoll() ?? false } func roomViewController(_ roomViewController: RoomViewController, endPollWithEventIdentifier eventIdentifier: String) { - // Tchap: Disable polls -// TimelinePollProvider.shared.timelinePollCoordinatorForEventIdentifier(eventIdentifier)?.endPoll() + TimelinePollProvider.shared.timelinePollCoordinatorForEventIdentifier(eventIdentifier)?.endPoll() } func roomViewController(_ roomViewController: RoomViewController, canEditPollWithEventIdentifier eventIdentifier: String) -> Bool { - return /*TimelinePollProvider.shared.timelinePollCoordinatorForEventIdentifier(eventIdentifier)?.canEditPoll() ??*/ false + return TimelinePollProvider.shared.timelinePollCoordinatorForEventIdentifier(eventIdentifier)?.canEditPoll() ?? false } func roomViewController(_ roomViewController: RoomViewController, didRequestEditForPollWithStart startEvent: MXEvent) { -// startEditPollCoordinator(startEvent: startEvent) + startEditPollCoordinator(startEvent: startEvent) } func roomViewControllerDidStartLoading(_ roomViewController: RoomViewController) { diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index 47ca17f555..8c59c88fdb 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -3286,39 +3286,39 @@ - (RoomTimelineCellIdentifier)cellIdentifierForCellData:(MXKCellData*)cellData a } } } -// else if (bubbleData.tag == RoomBubbleCellDataTagPoll) -// { -// if (bubbleData.isIncoming) -// { -// if (bubbleData.isPaginationFirstBubble) -// { -// cellIdentifier = RoomTimelineCellIdentifierIncomingPollWithPaginationTitle; -// } -// else if (bubbleData.shouldHideSenderInformation) -// { -// cellIdentifier = RoomTimelineCellIdentifierIncomingPollWithoutSenderInfo; -// } -// else -// { -// cellIdentifier = RoomTimelineCellIdentifierIncomingPoll; -// } -// } -// else -// { -// if (bubbleData.isPaginationFirstBubble) -// { -// cellIdentifier = RoomTimelineCellIdentifierOutgoingPollWithPaginationTitle; -// } -// else if (bubbleData.shouldHideSenderInformation) -// { -// cellIdentifier = RoomTimelineCellIdentifierOutgoingPollWithoutSenderInfo; -// } -// else -// { -// cellIdentifier = RoomTimelineCellIdentifierOutgoingPoll; -// } -// } -// } + else if (bubbleData.tag == RoomBubbleCellDataTagPoll) + { + if (bubbleData.isIncoming) + { + if (bubbleData.isPaginationFirstBubble) + { + cellIdentifier = RoomTimelineCellIdentifierIncomingPollWithPaginationTitle; + } + else if (bubbleData.shouldHideSenderInformation) + { + cellIdentifier = RoomTimelineCellIdentifierIncomingPollWithoutSenderInfo; + } + else + { + cellIdentifier = RoomTimelineCellIdentifierIncomingPoll; + } + } + else + { + if (bubbleData.isPaginationFirstBubble) + { + cellIdentifier = RoomTimelineCellIdentifierOutgoingPollWithPaginationTitle; + } + else if (bubbleData.shouldHideSenderInformation) + { + cellIdentifier = RoomTimelineCellIdentifierOutgoingPollWithoutSenderInfo; + } + else + { + cellIdentifier = RoomTimelineCellIdentifierOutgoingPoll; + } + } + } // else if (bubbleData.tag == RoomBubbleCellDataTagLocation || bubbleData.tag == RoomBubbleCellDataTagLiveLocation) // { // if (bubbleData.isIncoming) diff --git a/Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m b/Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m index a862a8460e..2dc24aa911 100644 --- a/Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m +++ b/Riot/Modules/Room/TimelineCells/Styles/Bubble/BubbleRoomTimelineCellProvider.m @@ -100,12 +100,12 @@ - (void)registerVoiceMessageCellsForTableView:(UITableView*)tableView - (void)registerPollCellsForTableView:(UITableView *)tableView { // // Incoming -// [tableView registerClass:PollIncomingBubbleCell.class forCellReuseIdentifier:PollIncomingBubbleCell.defaultReuseIdentifier]; -// [tableView registerClass:PollIncomingWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:PollIncomingWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; -// [tableView registerClass:PollIncomingWithPaginationTitleBubbleCell.class forCellReuseIdentifier:PollIncomingWithPaginationTitleBubbleCell.defaultReuseIdentifier]; + [tableView registerClass:PollIncomingBubbleCell.class forCellReuseIdentifier:PollIncomingBubbleCell.defaultReuseIdentifier]; + [tableView registerClass:PollIncomingWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:PollIncomingWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; + [tableView registerClass:PollIncomingWithPaginationTitleBubbleCell.class forCellReuseIdentifier:PollIncomingWithPaginationTitleBubbleCell.defaultReuseIdentifier]; // // Outgoing -// [tableView registerClass:PollOutgoingWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:PollOutgoingWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; -// [tableView registerClass:PollOutgoingWithPaginationTitleBubbleCell.class forCellReuseIdentifier:PollOutgoingWithPaginationTitleBubbleCell.defaultReuseIdentifier]; + [tableView registerClass:PollOutgoingWithoutSenderInfoBubbleCell.class forCellReuseIdentifier:PollOutgoingWithoutSenderInfoBubbleCell.defaultReuseIdentifier]; + [tableView registerClass:PollOutgoingWithPaginationTitleBubbleCell.class forCellReuseIdentifier:PollOutgoingWithPaginationTitleBubbleCell.defaultReuseIdentifier]; } - (void)registerLocationCellsForTableView:(UITableView*)tableView @@ -285,7 +285,7 @@ - (void)registerVoiceBroadcastRecorderCellsForTableView:(UITableView*)tableView - (NSDictionary *)pollCellsMapping { - return @{/* + return @{ // Incoming @(RoomTimelineCellIdentifierIncomingPoll) : PollIncomingBubbleCell.class, @(RoomTimelineCellIdentifierIncomingPollWithoutSenderInfo) : PollIncomingWithoutSenderInfoBubbleCell.class, @@ -293,7 +293,7 @@ - (void)registerVoiceBroadcastRecorderCellsForTableView:(UITableView*)tableView // Outgoing @(RoomTimelineCellIdentifierOutgoingPoll) : PollOutgoingWithoutSenderInfoBubbleCell.class, @(RoomTimelineCellIdentifierOutgoingPollWithoutSenderInfo) : PollOutgoingWithoutSenderInfoBubbleCell.class, - @(RoomTimelineCellIdentifierOutgoingPollWithPaginationTitle) : PollOutgoingWithPaginationTitleBubbleCell.class,*/ + @(RoomTimelineCellIdentifierOutgoingPollWithPaginationTitle) : PollOutgoingWithPaginationTitleBubbleCell.class, }; } diff --git a/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m b/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m index 65d2a117bd..e178d77235 100644 --- a/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m +++ b/Riot/Modules/Room/TimelineCells/Styles/Plain/PlainRoomTimelineCellProvider.m @@ -261,9 +261,9 @@ - (void)registerVoiceMessageCellsForTableView:(UITableView*)tableView - (void)registerPollCellsForTableView:(UITableView*)tableView { -// [tableView registerClass:PollPlainCell.class forCellReuseIdentifier:PollPlainCell.defaultReuseIdentifier]; -// [tableView registerClass:PollWithoutSenderInfoPlainCell.class forCellReuseIdentifier:PollWithoutSenderInfoPlainCell.defaultReuseIdentifier]; -// [tableView registerClass:PollWithPaginationTitlePlainCell.class forCellReuseIdentifier:PollWithPaginationTitlePlainCell.defaultReuseIdentifier]; + [tableView registerClass:PollPlainCell.class forCellReuseIdentifier:PollPlainCell.defaultReuseIdentifier]; + [tableView registerClass:PollWithoutSenderInfoPlainCell.class forCellReuseIdentifier:PollWithoutSenderInfoPlainCell.defaultReuseIdentifier]; + [tableView registerClass:PollWithPaginationTitlePlainCell.class forCellReuseIdentifier:PollWithPaginationTitlePlainCell.defaultReuseIdentifier]; } - (void)registerLocationCellsForTableView:(UITableView*)tableView @@ -566,13 +566,13 @@ - (void)registerVoiceBroadcastRecorderCellsForTableView:(UITableView*)tableView { return @{ // Incoming -// @(RoomTimelineCellIdentifierIncomingPoll) : PollPlainCell.class, -// @(RoomTimelineCellIdentifierIncomingPollWithoutSenderInfo) : PollWithoutSenderInfoPlainCell.class, -// @(RoomTimelineCellIdentifierIncomingPollWithPaginationTitle) : PollWithPaginationTitlePlainCell.class, + @(RoomTimelineCellIdentifierIncomingPoll) : PollPlainCell.class, + @(RoomTimelineCellIdentifierIncomingPollWithoutSenderInfo) : PollWithoutSenderInfoPlainCell.class, + @(RoomTimelineCellIdentifierIncomingPollWithPaginationTitle) : PollWithPaginationTitlePlainCell.class, // Outoing -// @(RoomTimelineCellIdentifierOutgoingPoll) : PollPlainCell.class, -// @(RoomTimelineCellIdentifierOutgoingPollWithoutSenderInfo) : PollWithoutSenderInfoPlainCell.class, -// @(RoomTimelineCellIdentifierOutgoingPollWithPaginationTitle) : PollWithPaginationTitlePlainCell.class + @(RoomTimelineCellIdentifierOutgoingPoll) : PollPlainCell.class, + @(RoomTimelineCellIdentifierOutgoingPollWithoutSenderInfo) : PollWithoutSenderInfoPlainCell.class, + @(RoomTimelineCellIdentifierOutgoingPollWithPaginationTitle) : PollWithPaginationTitlePlainCell.class }; } diff --git a/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormAnswerOptionView.swift b/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormAnswerOptionView.swift index 325ae540b6..d71fb8681e 100644 --- a/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormAnswerOptionView.swift +++ b/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormAnswerOptionView.swift @@ -38,7 +38,7 @@ struct PollEditFormAnswerOptionView: View { }) .textFieldStyle(BorderedInputFieldStyle(isEditing: focused)) Button(action: onDelete) { - Image(uiImage: Asset.Images.pollDeleteOptionIcon.image) + Image(uiImage: Asset_tchap.Images.tchapPollDeleteOptionIcon.image) } .accessibilityIdentifier("Delete answer option") } diff --git a/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormTypePicker.swift b/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormTypePicker.swift index 9a2b481457..732a268b80 100644 --- a/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormTypePicker.swift +++ b/RiotSwiftUI/Modules/Room/PollEditForm/View/PollEditFormTypePicker.swift @@ -77,9 +77,9 @@ private struct PollEditFormTypeButton: View { private var selectionImage: UIImage { if type == selectedType { - return Asset.Images.pollTypeCheckboxSelected.image + return Asset_tchap.Images.tchapPollTypeCheckboxSelected.image } else { - return Asset.Images.pollTypeCheckboxDefault.image + return Asset_tchap.Images.tchapPollTypeCheckboxDefault.image } } } diff --git a/RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollAnswerOptionButton.swift b/RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollAnswerOptionButton.swift index 1488911bd6..635c7f1304 100644 --- a/RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollAnswerOptionButton.swift +++ b/RiotSwiftUI/Modules/Room/TimelinePoll/View/TimelinePollAnswerOptionButton.swift @@ -51,7 +51,7 @@ struct TimelinePollAnswerOptionButton: View { VStack(alignment: .leading, spacing: 12.0) { HStack(alignment: .top, spacing: 8.0) { if !poll.closed { - Image(uiImage: answerOption.selected ? Asset.Images.pollCheckboxSelected.image : Asset.Images.pollCheckboxDefault.image) + Image(uiImage: answerOption.selected ? Asset_tchap.Images.tchapPollCheckboxSelected.image : Asset_tchap.Images.tchapPollCheckboxDefault.image) } Text(answerOption.text) @@ -62,7 +62,7 @@ struct TimelinePollAnswerOptionButton: View { HStack(spacing: 6) { if poll.closed, answerOption.winner { - Image(uiImage: Asset.Images.pollWinnerIcon.image) + Image(uiImage: Asset_tchap.Images.tchapPollWinnerIcon.image) } if poll.shouldDiscloseResults { diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/Contents.json new file mode 100644 index 0000000000..73c00596a7 --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/Contents.json new file mode 100644 index 0000000000..dad70857cc --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "poll_checkbox_default.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "poll_checkbox_default@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "poll_checkbox_default@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/poll_checkbox_default.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/poll_checkbox_default.png new file mode 100644 index 0000000000..84e4190794 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/poll_checkbox_default.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/poll_checkbox_default@2x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/poll_checkbox_default@2x.png new file mode 100644 index 0000000000..7e6083bc31 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/poll_checkbox_default@2x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/poll_checkbox_default@3x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/poll_checkbox_default@3x.png new file mode 100644 index 0000000000..316a8eab7a Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_default.imageset/poll_checkbox_default@3x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/Contents.json new file mode 100644 index 0000000000..e1f28a0dcf --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "poll_checkbox_selected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "poll_checkbox_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "poll_checkbox_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/poll_checkbox_selected.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/poll_checkbox_selected.png new file mode 100644 index 0000000000..9b36d48a06 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/poll_checkbox_selected.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/poll_checkbox_selected@2x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/poll_checkbox_selected@2x.png new file mode 100644 index 0000000000..09c23e2fb1 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/poll_checkbox_selected@2x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/poll_checkbox_selected@3x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/poll_checkbox_selected@3x.png new file mode 100644 index 0000000000..78962601c0 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_checkbox_selected.imageset/poll_checkbox_selected@3x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/Contents.json new file mode 100644 index 0000000000..19dac30ff5 --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "poll_delete_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "poll_delete_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "poll_delete_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/poll_delete_icon.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/poll_delete_icon.png new file mode 100644 index 0000000000..e2ad145460 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/poll_delete_icon.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/poll_delete_icon@2x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/poll_delete_icon@2x.png new file mode 100644 index 0000000000..b45ce02ed6 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/poll_delete_icon@2x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/poll_delete_icon@3x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/poll_delete_icon@3x.png new file mode 100644 index 0000000000..e960f0ffa7 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_icon.imageset/poll_delete_icon@3x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/Contents.json new file mode 100644 index 0000000000..29638e38ad --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "poll_delete_option_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "poll_delete_option_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "poll_delete_option_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/poll_delete_option_icon.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/poll_delete_option_icon.png new file mode 100644 index 0000000000..0a1dc0a326 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/poll_delete_option_icon.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/poll_delete_option_icon@2x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/poll_delete_option_icon@2x.png new file mode 100644 index 0000000000..bfc0e272d3 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/poll_delete_option_icon@2x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/poll_delete_option_icon@3x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/poll_delete_option_icon@3x.png new file mode 100644 index 0000000000..a209b1b37b Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_delete_option_icon.imageset/poll_delete_option_icon@3x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/Contents.json new file mode 100644 index 0000000000..b83445a6b1 --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "poll_edit_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "poll_edit_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "poll_edit_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/poll_edit_icon.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/poll_edit_icon.png new file mode 100644 index 0000000000..9bcc9356e1 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/poll_edit_icon.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/poll_edit_icon@2x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/poll_edit_icon@2x.png new file mode 100644 index 0000000000..bb7f31e2d7 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/poll_edit_icon@2x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/poll_edit_icon@3x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/poll_edit_icon@3x.png new file mode 100644 index 0000000000..c3a7e3aebd Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_edit_icon.imageset/poll_edit_icon@3x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/Contents.json new file mode 100644 index 0000000000..165d800983 --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "poll_end_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "poll_end_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "poll_end_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/poll_end_icon.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/poll_end_icon.png new file mode 100644 index 0000000000..8ca40ab42e Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/poll_end_icon.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/poll_end_icon@2x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/poll_end_icon@2x.png new file mode 100644 index 0000000000..2d93bd4021 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/poll_end_icon@2x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/poll_end_icon@3x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/poll_end_icon@3x.png new file mode 100644 index 0000000000..282514b329 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_end_icon.imageset/poll_end_icon@3x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/Contents.json new file mode 100644 index 0000000000..945c5c3372 --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "poll_type_checkbox_default.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "poll_type_checkbox_default@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "poll_type_checkbox_default@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/poll_type_checkbox_default.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/poll_type_checkbox_default.png new file mode 100644 index 0000000000..84e4190794 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/poll_type_checkbox_default.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/poll_type_checkbox_default@2x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/poll_type_checkbox_default@2x.png new file mode 100644 index 0000000000..7e6083bc31 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/poll_type_checkbox_default@2x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/poll_type_checkbox_default@3x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/poll_type_checkbox_default@3x.png new file mode 100644 index 0000000000..316a8eab7a Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_default.imageset/poll_type_checkbox_default@3x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/Contents.json new file mode 100644 index 0000000000..b7fbce06be --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "poll_type_checkbox_selected.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "poll_type_checkbox_selected@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "poll_type_checkbox_selected@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/poll_type_checkbox_selected.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/poll_type_checkbox_selected.png new file mode 100644 index 0000000000..cd6b2b04fd Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/poll_type_checkbox_selected.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/poll_type_checkbox_selected@2x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/poll_type_checkbox_selected@2x.png new file mode 100644 index 0000000000..22cd51f272 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/poll_type_checkbox_selected@2x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/poll_type_checkbox_selected@3x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/poll_type_checkbox_selected@3x.png new file mode 100644 index 0000000000..977c4c4a72 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_type_checkbox_selected.imageset/poll_type_checkbox_selected@3x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/Contents.json b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/Contents.json new file mode 100644 index 0000000000..61c735d9bf --- /dev/null +++ b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "poll_winner_icon.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "poll_winner_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "poll_winner_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/poll_winner_icon.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/poll_winner_icon.png new file mode 100644 index 0000000000..1e0a260927 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/poll_winner_icon.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/poll_winner_icon@2x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/poll_winner_icon@2x.png new file mode 100644 index 0000000000..c87dc1cde1 Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/poll_winner_icon@2x.png differ diff --git a/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/poll_winner_icon@3x.png b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/poll_winner_icon@3x.png new file mode 100644 index 0000000000..0a213a71bd Binary files /dev/null and b/Tchap/Assets/Images.xcassets/Room/Polls/tchap_poll_winner_icon.imageset/poll_winner_icon@3x.png differ diff --git a/Tchap/Generated/Images.swift b/Tchap/Generated/Images.swift index 681956594e..2738bcb053 100644 --- a/Tchap/Generated/Images.swift +++ b/Tchap/Generated/Images.swift @@ -45,6 +45,15 @@ internal class Asset_tchap: NSObject { internal static let roomHeaderHistory = ImageAsset(name: "room_header_history") internal static let roomHeaderMembers = ImageAsset(name: "room_header_members") internal static let sendIconTchap = ImageAsset(name: "send_icon_tchap") + internal static let tchapPollCheckboxDefault = ImageAsset(name: "tchap_poll_checkbox_default") + internal static let tchapPollCheckboxSelected = ImageAsset(name: "tchap_poll_checkbox_selected") + internal static let tchapPollDeleteIcon = ImageAsset(name: "tchap_poll_delete_icon") + internal static let tchapPollDeleteOptionIcon = ImageAsset(name: "tchap_poll_delete_option_icon") + internal static let tchapPollEditIcon = ImageAsset(name: "tchap_poll_edit_icon") + internal static let tchapPollEndIcon = ImageAsset(name: "tchap_poll_end_icon") + internal static let tchapPollTypeCheckboxDefault = ImageAsset(name: "tchap_poll_type_checkbox_default") + internal static let tchapPollTypeCheckboxSelected = ImageAsset(name: "tchap_poll_type_checkbox_selected") + internal static let tchapPollWinnerIcon = ImageAsset(name: "tchap_poll_winner_icon") internal static let forum = ImageAsset(name: "forum") internal static let privateRoom = ImageAsset(name: "private_room") internal static let roomTypeForum = ImageAsset(name: "room_type_forum") diff --git a/Tchap/target.yml b/Tchap/target.yml index 014ac20f53..d15f069780 100644 --- a/Tchap/target.yml +++ b/Tchap/target.yml @@ -251,12 +251,9 @@ targetTemplates: - "RoomViewController+LocationSharing.swift" - "TimelineCells/LocationView" - "TimelineCells/Styles/Plain/Cells/Location" - - "TimelineCells/Styles/Plain/Cells/Poll" - "TimelineCells/Styles/Bubble/Cells/Location" - - "TimelineCells/Styles/Bubble/Cells/Poll" - "Views/BubbleCells/KeyVerification/SizingViewHeight.swift" - "Views/BubbleCells/Location" - - "Views/BubbleCells/Poll" - path: ../Riot/Modules/Rooms - path: ../Riot/Modules/Secrets - path: ../Riot/Modules/SecureBackup diff --git a/changelog.d/880. feature b/changelog.d/880. feature new file mode 100644 index 0000000000..969f269d9b --- /dev/null +++ b/changelog.d/880. feature @@ -0,0 +1 @@ +Activer les sondages (Polls)