mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge branch 'develop' of github.com:vector-im/element-ios into langleyd/4781_swiftui_template_examples
This commit is contained in:
commit
310028bd39
27 changed files with 171 additions and 95 deletions
|
@ -4,7 +4,8 @@
|
|||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
buildImplicitDependencies = "YES"
|
||||
runPostActionsOnFailure = "NO">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
|
|
|
@ -1183,7 +1183,8 @@
|
|||
"pin_protection_settings_enable_pin" = "Включи PIN код";
|
||||
"pin_protection_settings_enabled_forced" = "PIN кодът е включен";
|
||||
"pin_protection_settings_section_footer" = "За да нулирате PIN кода, ще трябва да влезете наново и да създадете нов.";
|
||||
"pin_protection_settings_section_header_x" = "PIN и %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN и %@";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Ако не помните PIN кода си, натиснете бутона за забравен PIN код.";
|
||||
"pin_protection_mismatch_error_message" = "Опитайте пак";
|
||||
"pin_protection_mismatch_error_title" = "PIN кодовете не съвпадат";
|
||||
|
|
|
@ -1161,7 +1161,8 @@
|
|||
"pin_protection_mismatch_error_title" = "Die PINs stimmen nicht überein";
|
||||
"pin_protection_mismatch_error_message" = "Bitte versuche es erneut";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Wenn du dich nicht an deine PIN erinnern kannst, drücke \"PIN vergessen\".";
|
||||
"pin_protection_settings_section_header_x" = "PIN und %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN und %@";
|
||||
"pin_protection_settings_section_footer" = "Um deine PIN zurückzusetzen, musst du dich erneut anmelden und eine neue erstellen.";
|
||||
"pin_protection_settings_enabled_forced" = "PIN aktiviert";
|
||||
"pin_protection_settings_enable_pin" = "PIN aktivieren";
|
||||
|
|
|
@ -1577,7 +1577,8 @@ Tap the + to start adding people.";
|
|||
"pin_protection_mismatch_error_title" = "PINs don't match";
|
||||
"pin_protection_mismatch_error_message" = "Please try again";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "If you can't remember your PIN, tap the forgot PIN button.";
|
||||
"pin_protection_settings_section_header_x" = "PIN & %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN & %@";
|
||||
"pin_protection_settings_section_footer" = "To reset your PIN, you'll need to re-login and create a new one.";
|
||||
"pin_protection_settings_enabled_forced" = "PIN enabled";
|
||||
"pin_protection_settings_enable_pin" = "Enable PIN";
|
||||
|
|
|
@ -632,7 +632,8 @@
|
|||
"pin_protection_settings_enable_pin" = "Ŝalti personan identigan numeron";
|
||||
"pin_protection_settings_enabled_forced" = "Persona identiga numero ŝaltiĝis";
|
||||
"pin_protection_settings_section_footer" = "Por restarigi vian personan identigan numeron, vi devos resaluti kaj krei novan.";
|
||||
"pin_protection_settings_section_header_x" = "PIN kaj %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN kaj %@";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Se vi ne memoras, tuŝetu la butonon «forgesita persona identiga numero».";
|
||||
"pin_protection_mismatch_error_message" = "Bonvolu reprovi";
|
||||
"pin_protection_mismatch_error_title" = "Personaj identigaj numeroj ne akordas";
|
||||
|
|
|
@ -1072,7 +1072,8 @@
|
|||
"major_update_information" = "Meil on hea meel teatada, et oleme muutnud nime! Sinu rakendus on uuendatud ning sa oled oma kontole sisse logitud.";
|
||||
"major_update_learn_more_action" = "Lisateave";
|
||||
"major_update_done_action" = "Selge lugu";
|
||||
"pin_protection_settings_section_header_x" = "PIN-kood ja %@";
|
||||
"pin_protection_settings_section_header" = "PIN-kood";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN-kood ja %@";
|
||||
"pin_protection_settings_section_footer" = "PIN-koodi lähtestamiseks peaksid sa uuesti sisse looma ning seadistama uue PIN-koodi.";
|
||||
"pin_protection_settings_enabled_forced" = "PIN-kood on kasutusel";
|
||||
"pin_protection_settings_enable_pin" = "Võta PIN-kood kasutusele";
|
||||
|
|
|
@ -1268,7 +1268,8 @@
|
|||
"pin_protection_settings_enable_pin" = "Activer le code PIN";
|
||||
"pin_protection_settings_enabled_forced" = "Code PIN activé";
|
||||
"pin_protection_settings_section_footer" = "Pour réinitialiser votre code PIN, vous devez vous ré-authentifier et en créer un nouveau.";
|
||||
"pin_protection_settings_section_header_x" = "PIN & %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN & %@";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Si vous avez oublié votre code PIN, appuyez sur le bouton « PIN oublié ».";
|
||||
"pin_protection_mismatch_error_message" = "Essayez à nouveau";
|
||||
"pin_protection_mismatch_error_title" = "Les codes PIN ne correspondent pas";
|
||||
|
|
|
@ -1187,7 +1187,8 @@
|
|||
"pin_protection_settings_section_footer" = "A PIN újbóli beállításához újra be kell lépjél és létre kell hozni egy újat.";
|
||||
"pin_protection_settings_enabled_forced" = "PIN engedélyezve";
|
||||
"pin_protection_settings_enable_pin" = "PIN engedélyezése";
|
||||
"pin_protection_settings_section_header_x" = "PIN & %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN & %@";
|
||||
"biometrics_mode_touch_id" = "Érintéses azonosítás";
|
||||
"biometrics_mode_face_id" = "Arc felismerés";
|
||||
"biometrics_settings_enable_x" = "%@ engedélyezése";
|
||||
|
|
|
@ -1155,7 +1155,8 @@
|
|||
"pin_protection_mismatch_error_title" = "I PIN non corrispondono";
|
||||
"pin_protection_mismatch_error_message" = "Riprova";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Se non riesci a ricordare il PIN, premi il tasto \"PIN dimenticato\".";
|
||||
"pin_protection_settings_section_header_x" = "PIN e %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN e %@";
|
||||
"pin_protection_settings_section_footer" = "Per reimpostare il PIN, dovrai riaccedere e crearne uno nuovo.";
|
||||
"pin_protection_settings_enabled_forced" = "PIN attivato";
|
||||
"pin_protection_settings_enable_pin" = "Attiva PIN";
|
||||
|
|
|
@ -812,7 +812,8 @@
|
|||
|
||||
"biometrics_mode_touch_id" = "Asulay n tnalit";
|
||||
"pin_protection_settings_enabled_forced" = "Yermed PIN";
|
||||
"pin_protection_settings_section_header_x" = "PIN & %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN & %@";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Ma yella ur tezmireḍ ara ad tecfuḍ ɣef PIN inek·inem, sit ɣef tqeffalt n PIN yettwattun.";
|
||||
"pin_protection_mismatch_error_title" = "PINs ur mṣadan ara";
|
||||
"pin_protection_reset_alert_message" = "I uwennez n PIN-inek·inem, tesriḍ ad talseḍ anekcum syen rnu yiwen";
|
||||
|
|
|
@ -1336,7 +1336,8 @@
|
|||
// MARK: - Major update
|
||||
|
||||
"major_update_title" = "Riot er nå Element";
|
||||
"pin_protection_settings_section_header_x" = "PIN-kode og %@";
|
||||
"pin_protection_settings_section_header" = "PIN-kode";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN-kode og %@";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Hvis du ikke kan huske PIN-koden din, trykker du på glemt PIN-knappen.";
|
||||
"pin_protection_mismatch_error_title" = "PIN-koder samsvarer ikke";
|
||||
"pin_protection_reset_alert_message" = "For å tilbakestille PIN-koden din, må du logge på igjen og opprette en ny";
|
||||
|
|
|
@ -981,7 +981,8 @@
|
|||
"pin_protection_settings_enable_pin" = "PIN inschakelen";
|
||||
"pin_protection_settings_enabled_forced" = "PIN ingeschakeld";
|
||||
"pin_protection_settings_section_footer" = "Om uw PIN opnieuw in te stellen moet u straks opnieuw inloggen en een nieuwe PIN aanmaken.";
|
||||
"pin_protection_settings_section_header_x" = "PIN en %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN en %@";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Als u uw PIN bent vergeten, klik op de PIN vergeten-knop.";
|
||||
"pin_protection_mismatch_error_message" = "Probeer het opnieuw";
|
||||
"pin_protection_mismatch_error_title" = "PIN's zijn niet hetzelfde";
|
||||
|
|
|
@ -976,7 +976,8 @@
|
|||
"pin_protection_settings_enable_pin" = "Włącz PIN";
|
||||
"pin_protection_settings_enabled_forced" = "Blokada PIN włączona";
|
||||
"pin_protection_settings_section_footer" = "Aby zresetować PIN wyloguj się i zaloguj ponownie.";
|
||||
"pin_protection_settings_section_header_x" = "PIN & %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN & %@";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Jeżeli nie pamiętasz PINu, naciśnij Zapomniałem(-am) PIN.";
|
||||
"pin_protection_mismatch_error_message" = "Proszę, spróbuj ponownie";
|
||||
"pin_protection_mismatch_error_title" = "PINy się nie zgadzają";
|
||||
|
|
|
@ -1146,7 +1146,8 @@
|
|||
"pin_protection_mismatch_error_title" = "PINs não correspondem";
|
||||
"pin_protection_mismatch_error_message" = "Por favor tente de novo";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Se você não consegue se lembrar de seu PIN, toque no botão esqueci PIN.";
|
||||
"pin_protection_settings_section_header_x" = "PIN & %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN & %@";
|
||||
"pin_protection_settings_section_footer" = "Para resettar seu PIN, você vai precisar re-fazer login e criar um novo.";
|
||||
"biometrics_mode_touch_id" = "Touch ID";
|
||||
"biometrics_mode_face_id" = "Face ID";
|
||||
|
|
|
@ -1165,7 +1165,8 @@
|
|||
"pin_protection_mismatch_error_title" = "PIN-коды не совпадают";
|
||||
"pin_protection_mismatch_error_message" = "Пожалуйста, попробуйте еще раз";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Если вы не можете вспомнить свой PIN-код, нажмите кнопку забытого PIN-кода.";
|
||||
"pin_protection_settings_section_header_x" = "PIN-код и %@";
|
||||
"pin_protection_settings_section_header" = "PIN-код";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN-код и %@";
|
||||
"pin_protection_settings_section_footer" = "Чтобы сбросить свой PIN-код, вам нужно будет повторно войти в аккаунт и создать новый PIN-код.";
|
||||
"pin_protection_settings_enabled_forced" = "PIN-код включён";
|
||||
"pin_protection_settings_enable_pin" = "Включить PIN-код";
|
||||
|
|
|
@ -1169,7 +1169,8 @@
|
|||
"pin_protection_mismatch_error_title" = "PIN-et s’përputhen";
|
||||
"pin_protection_mismatch_error_message" = "Ju lutemi, riprovoni";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Nëse s’mbani mend PIN-in tuaj, prekni butonin “Harrova PIN-in”.";
|
||||
"pin_protection_settings_section_header_x" = "PIN & %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN & %@";
|
||||
"pin_protection_settings_section_footer" = "Që të ricaktoni PIN-in tuaj, do t’ju duhet të ribëni hyrjen dhe të krijoni një të ri.";
|
||||
"pin_protection_settings_enabled_forced" = "PIN i aktivizuar";
|
||||
"pin_protection_settings_enable_pin" = "Aktivizo PIN-in";
|
||||
|
|
|
@ -1120,7 +1120,8 @@
|
|||
"pin_protection_mismatch_error_title" = "PIN-koderna matchar inte";
|
||||
"pin_protection_mismatch_error_message" = "Vänligen försök igen";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "Om du inte kommer ihåg din PIN-kod, tryck på knappen \"Glömt PIN-kod\".";
|
||||
"pin_protection_settings_section_header_x" = "PIN & %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN & %@";
|
||||
"pin_protection_settings_section_footer" = "För att återställa din PIN-kod så behöver du logga in igen och skapa en ny.";
|
||||
"pin_protection_settings_enabled_forced" = "PIN-kod aktiverad";
|
||||
"pin_protection_settings_enable_pin" = "Aktivera PIN-kod";
|
||||
|
|
|
@ -1278,7 +1278,8 @@
|
|||
"pin_protection_settings_enable_pin" = "启用 PIN";
|
||||
"pin_protection_settings_enabled_forced" = "PIN 已启用";
|
||||
"pin_protection_settings_section_footer" = "要重置你的密码,你需要重新登录并创建一个新的。";
|
||||
"pin_protection_settings_section_header_x" = "PIN & %@";
|
||||
"pin_protection_settings_section_header" = "PIN";
|
||||
"pin_protection_settings_section_header_with_biometrics" = "PIN & %@";
|
||||
"pin_protection_mismatch_too_many_times_error_message" = "如果你没记不住你的 PIN,点击忘记密码按钮。";
|
||||
"pin_protection_mismatch_error_title" = "PIN 不匹配";
|
||||
"pin_protection_reset_alert_message" = "为重置你的 PIN,你将需要重新登录并创建新的";
|
||||
|
|
|
@ -2302,9 +2302,13 @@ internal enum VectorL10n {
|
|||
internal static var pinProtectionSettingsSectionFooter: String {
|
||||
return VectorL10n.tr("Vector", "pin_protection_settings_section_footer")
|
||||
}
|
||||
/// PIN
|
||||
internal static var pinProtectionSettingsSectionHeader: String {
|
||||
return VectorL10n.tr("Vector", "pin_protection_settings_section_header")
|
||||
}
|
||||
/// PIN & %@
|
||||
internal static func pinProtectionSettingsSectionHeaderX(_ p1: String) -> String {
|
||||
return VectorL10n.tr("Vector", "pin_protection_settings_section_header_x", p1)
|
||||
internal static func pinProtectionSettingsSectionHeaderWithBiometrics(_ p1: String) -> String {
|
||||
return VectorL10n.tr("Vector", "pin_protection_settings_section_header_with_biometrics", p1)
|
||||
}
|
||||
/// Preview
|
||||
internal static var preview: String {
|
||||
|
|
|
@ -631,7 +631,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
|||
self.updateRoomReadMarker = NO;
|
||||
isAppeared = NO;
|
||||
|
||||
[VoiceMessageMediaServiceProvider.sharedProvider stopAllServices];
|
||||
[VoiceMessageMediaServiceProvider.sharedProvider pauseAllServices];
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated
|
||||
|
@ -4424,27 +4424,48 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
|||
else if (tappedView == previewHeader.rightButton)
|
||||
{
|
||||
// 'Join' button has been pressed
|
||||
if (roomPreviewData)
|
||||
if (!roomPreviewData)
|
||||
{
|
||||
// Attempt to join the room (keep reference on the potential eventId, the preview data will be removed automatically in case of success).
|
||||
NSString *eventId = roomPreviewData.eventId;
|
||||
[self joinRoom:^(MXKRoomViewControllerJoinRoomResult result) {
|
||||
switch (result)
|
||||
{
|
||||
case MXKRoomViewControllerJoinRoomResultSuccess:
|
||||
[self refreshRoomTitle];
|
||||
break;
|
||||
case MXKRoomViewControllerJoinRoomResultFailureRoomEmpty:
|
||||
[self declineRoomInvitation];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}];
|
||||
|
||||
// We promote here join by room alias instead of room id when an alias is available.
|
||||
NSString *roomIdOrAlias = roomPreviewData.roomId;
|
||||
return;
|
||||
}
|
||||
|
||||
// Attempt to join the room (keep reference on the potential eventId, the preview data will be removed automatically in case of success).
|
||||
NSString *eventId = roomPreviewData.eventId;
|
||||
|
||||
// We promote here join by room alias instead of room id when an alias is available.
|
||||
NSString *roomIdOrAlias = roomPreviewData.roomId;
|
||||
|
||||
if (roomPreviewData.roomCanonicalAlias.length)
|
||||
{
|
||||
roomIdOrAlias = roomPreviewData.roomCanonicalAlias;
|
||||
}
|
||||
else if (roomPreviewData.roomAliases.count)
|
||||
{
|
||||
roomIdOrAlias = roomPreviewData.roomAliases.firstObject;
|
||||
}
|
||||
|
||||
// Note in case of simple link to a room the signUrl param is nil
|
||||
[self joinRoomWithRoomIdOrAlias:roomIdOrAlias viaServers:roomPreviewData.viaServers
|
||||
andSignUrl:roomPreviewData.emailInvitation.signUrl
|
||||
completion:^(MXKRoomViewControllerJoinRoomResult result) {
|
||||
|
||||
if (roomPreviewData.roomCanonicalAlias.length)
|
||||
switch (result)
|
||||
{
|
||||
roomIdOrAlias = roomPreviewData.roomCanonicalAlias;
|
||||
}
|
||||
else if (roomPreviewData.roomAliases.count)
|
||||
{
|
||||
roomIdOrAlias = roomPreviewData.roomAliases.firstObject;
|
||||
}
|
||||
|
||||
// Note in case of simple link to a room the signUrl param is nil
|
||||
[self joinRoomWithRoomIdOrAlias:roomIdOrAlias viaServers:roomPreviewData.viaServers andSignUrl:roomPreviewData.emailInvitation.signUrl completion:^(BOOL succeed) {
|
||||
|
||||
if (succeed)
|
||||
case MXKRoomViewControllerJoinRoomResultSuccess:
|
||||
{
|
||||
// If an event was specified, replace the datasource by a non live datasource showing the event
|
||||
if (eventId)
|
||||
|
@ -4473,33 +4494,47 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
|
|||
[self refreshRoomTitle];
|
||||
[self refreshRoomInputToolbar];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self joinRoom:^(BOOL succeed) {
|
||||
|
||||
if (succeed)
|
||||
{
|
||||
[self refreshRoomTitle];
|
||||
}
|
||||
|
||||
}];
|
||||
}
|
||||
case MXKRoomViewControllerJoinRoomResultFailureRoomEmpty:
|
||||
[self declineRoomInvitation];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}];
|
||||
}
|
||||
else if (tappedView == previewHeader.leftButton)
|
||||
{
|
||||
// 'Decline' button has been pressed
|
||||
if (roomPreviewData)
|
||||
{
|
||||
[self roomPreviewDidTapCancelAction];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self leaveRoom];
|
||||
}
|
||||
[self declineRoomInvitation];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)declineRoomInvitation
|
||||
{
|
||||
// 'Decline' button has been pressed
|
||||
if (roomPreviewData)
|
||||
{
|
||||
[self roomPreviewDidTapCancelAction];
|
||||
}
|
||||
else
|
||||
{
|
||||
[self startActivityIndicator];
|
||||
|
||||
[self.roomDataSource.room leave:^{
|
||||
|
||||
[self stopActivityIndicator];
|
||||
|
||||
// We remove the current view controller.
|
||||
// Pop to homes view controller
|
||||
[[AppDelegate theDelegate] restoreInitialDisplay:^{}];
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
[self stopActivityIndicator];
|
||||
MXLogDebug(@"[RoomVC] Failed to reject an invited room (%@) failed", self.roomDataSource.room.roomId);
|
||||
|
||||
}];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,13 @@ import MediaPlayer
|
|||
|
||||
private var displayLink: CADisplayLink!
|
||||
|
||||
// Retain currently playing audio player so it doesn't stop playing on timeline cell reuse
|
||||
|
||||
|
||||
// Retain active audio players(playing or paused) so it doesn't stop playing on timeline cell reuse
|
||||
// and we can pause/resume players on switching rooms.
|
||||
private var activeAudioPlayers: Set<VoiceMessageAudioPlayer>
|
||||
|
||||
// Keep reference to currently playing player for remote control.
|
||||
private var currentlyPlayingAudioPlayer: VoiceMessageAudioPlayer?
|
||||
|
||||
@objc public static let sharedProvider = VoiceMessageMediaServiceProvider()
|
||||
|
@ -87,7 +93,7 @@ import MediaPlayer
|
|||
private override init() {
|
||||
audioPlayers = NSMapTable<NSString, VoiceMessageAudioPlayer>(valueOptions: .weakMemory)
|
||||
audioRecorders = NSHashTable<VoiceMessageAudioRecorder>(options: .weakMemory)
|
||||
|
||||
activeAudioPlayers = Set<VoiceMessageAudioPlayer>()
|
||||
super.init()
|
||||
|
||||
displayLink = CADisplayLink(target: WeakTarget(self, selector: #selector(handleDisplayLinkTick)), selector: WeakTarget.triggerSelector)
|
||||
|
@ -113,16 +119,17 @@ import MediaPlayer
|
|||
return audioRecorder
|
||||
}
|
||||
|
||||
@objc func stopAllServices() {
|
||||
stopAllServicesExcept(nil)
|
||||
@objc func pauseAllServices() {
|
||||
pauseAllServicesExcept(nil)
|
||||
}
|
||||
|
||||
// MARK: - VoiceMessageAudioPlayerDelegate
|
||||
|
||||
func audioPlayerDidStartPlaying(_ audioPlayer: VoiceMessageAudioPlayer) {
|
||||
currentlyPlayingAudioPlayer = audioPlayer
|
||||
activeAudioPlayers.insert(audioPlayer)
|
||||
setUpRemoteCommandCenter()
|
||||
stopAllServicesExcept(audioPlayer)
|
||||
pauseAllServicesExcept(audioPlayer)
|
||||
}
|
||||
|
||||
func audioPlayerDidStopPlaying(_ audioPlayer: VoiceMessageAudioPlayer) {
|
||||
|
@ -130,6 +137,7 @@ import MediaPlayer
|
|||
currentlyPlayingAudioPlayer = nil
|
||||
tearDownRemoteCommandCenter()
|
||||
}
|
||||
activeAudioPlayers.remove(audioPlayer)
|
||||
}
|
||||
|
||||
func audioPlayerDidFinishPlaying(_ audioPlayer: VoiceMessageAudioPlayer) {
|
||||
|
@ -137,17 +145,18 @@ import MediaPlayer
|
|||
currentlyPlayingAudioPlayer = nil
|
||||
tearDownRemoteCommandCenter()
|
||||
}
|
||||
activeAudioPlayers.remove(audioPlayer)
|
||||
}
|
||||
|
||||
// MARK: - VoiceMessageAudioRecorderDelegate
|
||||
|
||||
func audioRecorderDidStartRecording(_ audioRecorder: VoiceMessageAudioRecorder) {
|
||||
stopAllServicesExcept(audioRecorder)
|
||||
pauseAllServicesExcept(audioRecorder)
|
||||
}
|
||||
|
||||
// MARK: - Private
|
||||
|
||||
private func stopAllServicesExcept(_ service: AnyObject?) {
|
||||
private func pauseAllServicesExcept(_ service: AnyObject?) {
|
||||
for audioRecorder in audioRecorders.allObjects {
|
||||
if audioRecorder === service {
|
||||
continue
|
||||
|
@ -165,8 +174,7 @@ import MediaPlayer
|
|||
continue
|
||||
}
|
||||
|
||||
audioPlayer.stop()
|
||||
audioPlayer.unloadContent()
|
||||
audioPlayer.pause()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ extension SetPinCoordinator: EnterPinCodeCoordinatorDelegate {
|
|||
|
||||
func enterPinCodeCoordinator(_ coordinator: EnterPinCodeCoordinatorType, didCompleteWithPin pin: String) {
|
||||
storePin(pin)
|
||||
if pinCodePreferences.forcePinProtection && pinCodePreferences.isBiometricsAvailable {
|
||||
if pinCodePreferences.forcePinProtection && pinCodePreferences.isBiometricsAvailable && !pinCodePreferences.isBiometricsSet {
|
||||
viewMode = .setupBiometricsAfterLogin
|
||||
setRootCoordinator(createSetupBiometricsCoordinator())
|
||||
} else {
|
||||
|
|
|
@ -292,14 +292,21 @@ TableViewSectionsDelegate>
|
|||
Section *pinCodeSection = [Section sectionWithTag:SECTION_PIN_CODE];
|
||||
|
||||
// Header title
|
||||
NSString *pinCodeSectionHeaderTitleFormat = NSLocalizedStringFromTable(@"pin_protection_settings_section_header_x", @"Vector", nil);
|
||||
NSString *pinCodeSectionHeaderTitle = [NSString stringWithFormat:pinCodeSectionHeaderTitleFormat, [PinCodePreferences shared].localizedBiometricsName];
|
||||
pinCodeSection.headerTitle = pinCodeSectionHeaderTitle;
|
||||
if ([PinCodePreferences shared].isBiometricsAvailable)
|
||||
{
|
||||
NSString *pinCodeSectionHeaderTitleFormat = NSLocalizedStringFromTable(@"pin_protection_settings_section_header_with_biometrics", @"Vector", nil);
|
||||
NSString *pinCodeSectionHeaderTitle = [NSString stringWithFormat:pinCodeSectionHeaderTitleFormat, [PinCodePreferences shared].localizedBiometricsName];
|
||||
pinCodeSection.headerTitle = pinCodeSectionHeaderTitle;
|
||||
} else {
|
||||
pinCodeSection.headerTitle = NSLocalizedStringFromTable(@"pin_protection_settings_section_header", @"Vector", nil);;
|
||||
}
|
||||
|
||||
// Rows
|
||||
[pinCodeSection addRowWithTag:PIN_CODE_SETTING];
|
||||
[pinCodeSection addRowWithTag:PIN_CODE_DESCRIPTION];
|
||||
if ([PinCodePreferences shared].isPinSet) {
|
||||
|
||||
if ([PinCodePreferences shared].isPinSet)
|
||||
{
|
||||
[pinCodeSection addRowWithTag:PIN_CODE_CHANGE];
|
||||
}
|
||||
|
||||
|
@ -1183,17 +1190,17 @@ TableViewSectionsDelegate>
|
|||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
NSIndexPath *tagsIndexPath = [self.tableViewSections tagsIndexPathFromTableViewIndexPath:indexPath];
|
||||
NSInteger section = tagsIndexPath.section;
|
||||
NSInteger row = tagsIndexPath.row;
|
||||
NSInteger sectionTag = tagsIndexPath.section;
|
||||
NSInteger rowTag = tagsIndexPath.row;
|
||||
|
||||
// set the cell to a default value to avoid application crashes
|
||||
UITableViewCell *cell = [[UITableViewCell alloc] init];
|
||||
cell.backgroundColor = [UIColor redColor];
|
||||
|
||||
MXSession* session = self.mainSession;
|
||||
if (section == SECTION_PIN_CODE)
|
||||
if (sectionTag == SECTION_PIN_CODE)
|
||||
{
|
||||
if (indexPath.row == PIN_CODE_SETTING)
|
||||
if (rowTag == PIN_CODE_SETTING)
|
||||
{
|
||||
if ([PinCodePreferences shared].forcePinProtection)
|
||||
{
|
||||
|
@ -1213,7 +1220,7 @@ TableViewSectionsDelegate>
|
|||
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
}
|
||||
else if (indexPath.row == PIN_CODE_DESCRIPTION)
|
||||
else if (rowTag == PIN_CODE_DESCRIPTION)
|
||||
{
|
||||
if ([PinCodePreferences shared].isPinSet)
|
||||
{
|
||||
|
@ -1225,11 +1232,11 @@ TableViewSectionsDelegate>
|
|||
cell = [self descriptionCellForTableView:tableView withText:nil];
|
||||
}
|
||||
}
|
||||
else if (indexPath.row == PIN_CODE_CHANGE)
|
||||
else if (rowTag == PIN_CODE_CHANGE)
|
||||
{
|
||||
cell = [self buttonCellWithTitle:NSLocalizedStringFromTable(@"pin_protection_settings_change_pin", @"Vector", nil) action:@selector(changePinCode: ) forTableView:tableView atIndexPath:indexPath];
|
||||
}
|
||||
else if (indexPath.row == PIN_CODE_BIOMETRICS)
|
||||
else if (rowTag == PIN_CODE_BIOMETRICS)
|
||||
{
|
||||
MXKTableViewCellWithLabelAndSwitch *switchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
|
||||
|
||||
|
@ -1242,11 +1249,11 @@ TableViewSectionsDelegate>
|
|||
cell = switchCell;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_CRYPTO_SESSIONS)
|
||||
else if (sectionTag == SECTION_CRYPTO_SESSIONS)
|
||||
{
|
||||
if (self.showLoadingDevicesInformation)
|
||||
{
|
||||
if (indexPath.row == 0)
|
||||
if (rowTag == 0)
|
||||
{
|
||||
cell = [self descriptionCellForTableView:tableView
|
||||
withText:NSLocalizedStringFromTable(@"security_settings_crypto_sessions_loading", @"Vector", nil) ];
|
||||
|
@ -1259,11 +1266,11 @@ TableViewSectionsDelegate>
|
|||
}
|
||||
else
|
||||
{
|
||||
if (row < devicesArray.count)
|
||||
if (rowTag < devicesArray.count)
|
||||
{
|
||||
cell = [self deviceCellWithDevice:devicesArray[row] forTableView:tableView];
|
||||
cell = [self deviceCellWithDevice:devicesArray[rowTag] forTableView:tableView];
|
||||
}
|
||||
else if (row == devicesArray.count)
|
||||
else if (rowTag == devicesArray.count)
|
||||
{
|
||||
cell = [self descriptionCellForTableView:tableView
|
||||
withText:NSLocalizedStringFromTable(@"security_settings_crypto_sessions_description_2", @"Vector", nil) ];
|
||||
|
@ -1271,9 +1278,9 @@ TableViewSectionsDelegate>
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_SECURE_BACKUP)
|
||||
else if (sectionTag == SECTION_SECURE_BACKUP)
|
||||
{
|
||||
cell = [secureBackupSection cellForRowAtRow:row];
|
||||
cell = [secureBackupSection cellForRowAtRow:rowTag];
|
||||
}
|
||||
#ifdef CROSS_SIGNING_AND_BACKUP_DEV
|
||||
else if (section == SECTION_KEYBACKUP)
|
||||
|
@ -1281,9 +1288,9 @@ TableViewSectionsDelegate>
|
|||
cell = [keyBackupSection cellForRowAtRow:row];
|
||||
}
|
||||
#endif
|
||||
else if (section == SECTION_CROSSSIGNING)
|
||||
else if (sectionTag == SECTION_CROSSSIGNING)
|
||||
{
|
||||
switch (row)
|
||||
switch (rowTag)
|
||||
{
|
||||
case CROSSSIGNING_INFO:
|
||||
{
|
||||
|
@ -1300,9 +1307,9 @@ TableViewSectionsDelegate>
|
|||
break;
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_CRYPTOGRAPHY)
|
||||
else if (sectionTag == SECTION_CRYPTOGRAPHY)
|
||||
{
|
||||
switch (row)
|
||||
switch (rowTag)
|
||||
{
|
||||
case CRYPTOGRAPHY_INFO:
|
||||
{
|
||||
|
@ -1322,9 +1329,9 @@ TableViewSectionsDelegate>
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (section == SECTION_ADVANCED)
|
||||
else if (sectionTag == SECTION_ADVANCED)
|
||||
{
|
||||
switch (row)
|
||||
switch (rowTag)
|
||||
{
|
||||
case ADVANCED_BLACKLIST_UNVERIFIED_DEVICES:
|
||||
{
|
||||
|
|
1
changelog.d/4415.bugfix
Normal file
1
changelog.d/4415.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Cannot disable Face ID after disabling pin.
|
1
changelog.d/4461.bugfix
Normal file
1
changelog.d/4461.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Fixes "PIN & (NULL)" security section header when device biometrics are not available or not enrolled into.
|
1
changelog.d/47773.change
Normal file
1
changelog.d/47773.change
Normal file
|
@ -0,0 +1 @@
|
|||
Voice Messages: Pause playback when changing rooms while retaining the playback position when re-entering.
|
1
changelog.d/4830.change
Normal file
1
changelog.d/4830.change
Normal file
|
@ -0,0 +1 @@
|
|||
Automatically dismissing invites for empty rooms after failing to join.
|
Loading…
Reference in a new issue