Merge pull request #4613 from vector-im/gil/voice_messages_rc

Release blockers for voice messages
This commit is contained in:
Gil Eluard 2021-07-29 14:36:42 +02:00 committed by GitHub
commit 358201fbd3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 4 deletions

View file

@ -11,6 +11,9 @@ Changes to be released in next version
* People Tab: Remove the local contacts section (#4523).
* Contacts: Delay access to local contacts until they're needed for display (#4616).
* RecentsDataSource: Factorize section reset in one place (target #4591).
* Voice Messages: Tap/hold to send voice messages isn't intuitive (#4601).
* Voice Messages: copy could be improved (#4604).
* Slide to lock should be more generous (#4602).
🐛 Bugfix
* Room: Fixed mentioning users from room info member details (#4583)
@ -18,6 +21,7 @@ Changes to be released in next version
* Room Notification Settings: Fix Crash when opening the new Room Notification Settings Screen (Not yet released) (#4599).
* AuthenticationViewController: Fix crash on authentication if an intermediate view was presented (#4606).
* Room: Fixed crash when opening a read-only room (#4620).
* Voice Messages: Tapping on waveform in composer glitches UI (#4603).
⚠️ API Changes
*

View file

@ -1686,4 +1686,4 @@ Tap the + to start adding people.";
"voice_message_release_to_send" = "Hold to record, release to send";
"voice_message_remaining_recording_time" = "%@s left";
"voice_message_stop_locked_mode_recording" = "Tap on the wavelength to stop and playback";
"voice_message_stop_locked_mode_recording" = "Tap on your recording to stop or listen";

View file

@ -4890,7 +4890,7 @@ internal enum VectorL10n {
internal static func voiceMessageRemainingRecordingTime(_ p1: String) -> String {
return VectorL10n.tr("Vector", "voice_message_remaining_recording_time", p1)
}
/// Tap on the wavelength to stop and playback
/// Tap on your recording to stop or listen
internal static var voiceMessageStopLockedModeRecording: String {
return VectorL10n.tr("Vector", "voice_message_stop_locked_mode_recording")
}

View file

@ -45,7 +45,7 @@ struct VoiceMessageToolbarViewDetails {
class VoiceMessageToolbarView: PassthroughView, NibLoadable, Themable, UIGestureRecognizerDelegate, VoiceMessagePlaybackViewDelegate {
private enum Constants {
static let longPressMinimumDuration: TimeInterval = 1.0
static let longPressMinimumDuration: TimeInterval = 0.0
static let animationDuration: TimeInterval = 0.25
static let lockModeTransitionAnimationDuration: TimeInterval = 0.5
static let panDirectionChangeThreshold: CGFloat = 20.0
@ -145,7 +145,7 @@ class VoiceMessageToolbarView: PassthroughView, NibLoadable, Themable, UIGesture
convertedFrame = self.convert(lockChevron.frame, from: lockContainerView)
lockChevronToRecordButtonDistance = recordButtonsContainerView.frame.midY + convertedFrame.maxY
lockChevronToLockButtonDistance = lockChevron.frame.minY - lockButtonsContainerView.frame.midY
lockChevronToLockButtonDistance = (lockChevron.frame.minY - lockButtonsContainerView.frame.midY) / 2
startAnimatingRecordingIndicator()
default:
@ -393,6 +393,10 @@ class VoiceMessageToolbarView: PassthroughView, NibLoadable, Themable, UIGesture
}
@objc private func handleWaveformTap(_ gestureRecognizer: UITapGestureRecognizer) {
guard self.lastUIState == .lockedModeRecord else {
return
}
delegate?.voiceMessageToolbarViewDidRequestRecordingFinish(self)
}
}