Fixes 2070 - Prevent crashes when inserting mention pills in the composers on Mac

This commit is contained in:
Stefan Ceriu 2023-11-13 09:24:57 +02:00 committed by Stefan Ceriu
parent b4ec04ec26
commit 4a56796d45
3 changed files with 14 additions and 5 deletions

View File

@ -143,11 +143,6 @@ class AppLockServiceMock: AppLockServiceProtocol {
set(value) { underlyingBiometricUnlockTrusted = value }
}
var underlyingBiometricUnlockTrusted: Bool!
var disabledPublisher: AnyPublisher<Void, Never> {
get { return underlyingDisabledPublisher }
set(value) { underlyingDisabledPublisher = value }
}
var underlyingDisabledPublisher: AnyPublisher<Void, Never>!
var numberOfPINAttempts: AnyPublisher<Int, Never> {
get { return underlyingNumberOfPINAttempts }
set(value) { underlyingNumberOfPINAttempts = value }

View File

@ -74,6 +74,19 @@ final class PillAttachmentViewProvider: NSTextAttachmentViewProvider {
self.view = controller.view
delegate?.registerPillView(controller.view)
}
// MARK: - NSSecureCoding
// Fixes crashes when inserting mention pills in the composer on Mac
// https://github.com/vector-im/element-x-ios/issues/2070
static var supportsSecureCoding = false
func encode(with coder: NSCoder) { }
init?(coder: NSCoder) {
fatalError("Not implemented")
}
}
final class ComposerMentionDisplayHelper: MentionDisplayHelper {

1
changelog.d/2070.bugfix Normal file
View File

@ -0,0 +1 @@
Prevent crashes when inserting mention pills in the composers on Mac