Merge pull request #7206 from vector-im/alfogrillo/poll_decryption_message

Handle decryption errors in polls (PSG-1023)
This commit is contained in:
Alfonso Grillo
2023-01-09 17:20:28 +01:00
committed by GitHub
10 changed files with 52 additions and 5 deletions
+2
View File
@@ -2349,6 +2349,8 @@ Tap the + to start adding people.";
"poll_timeline_not_closed_subtitle" = "Please try again";
"poll_timeline_decryption_error" = "Due to decryption errors, some votes may not be counted";
// MARK: - Location sharing
"location_sharing_title" = "Location";
+28
View File
@@ -0,0 +1,28 @@
//
// Copyright 2022 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
extension Sequence {
func group<GroupID: Hashable>(by keyPath: KeyPath<Element, GroupID>) -> [GroupID: [Element]] {
var result: [GroupID: [Element]] = .init()
for item in self {
let groupId = item[keyPath: keyPath]
result[groupId] = (result[groupId] ?? []) + [item]
}
return result
}
}
+4
View File
@@ -4839,6 +4839,10 @@ public class VectorL10n: NSObject {
public static var pollEditFormUpdateFailureTitle: String {
return VectorL10n.tr("Vector", "poll_edit_form_update_failure_title")
}
/// Due to decryption errors, some votes may not be counted
public static var pollTimelineDecryptionError: String {
return VectorL10n.tr("Vector", "poll_timeline_decryption_error")
}
/// Please try again
public static var pollTimelineNotClosedSubtitle: String {
return VectorL10n.tr("Vector", "poll_timeline_not_closed_subtitle")