Fix Autoratotation stopping voice recording
Changes:
- Added
isVoiceInteractionActivecomputed property toConversationInputToolbarthat checks if voice memo is in active state (not idle/draft) - Added orientation lock logic to
ConversationViewController.shouldAutorotatethat prevents rotation during voice interactions - Both changes work together to fix autorotation issues during voice memo usage
First time contributor checklist
- [x] I have read the README and CONTRIBUTING documents
- [x] I have signed the Contributor Licence Agreement
Contributor checklist
- [x] My commits are rebased on the latest main branch
- [x] My commits are in nice logical chunks
- [x] My contribution is fully baked and is ready to be merged as is
- [x] I have tested my contribution on these devices:
- iPhone 15 Pro Max
Description
Fixing #6021 #4359
Hi, thanks for your interest in contributing. I'm not able to reproduce voice message recording or playback being interrupted by orientation change on either iOS 18 or iOS 26. Can you please provide more details as to what issue exactly you're experiencing?
Actually, I am able to reproduce specifically with a clockwise rotation, but not counter-clockwise.
This should already be prevented by the block of code just above what you added:
// Don't allow orientation changes while recording voice messages.
if viewState.inProgressVoiceMessage?.isRecording == true {
return false
}
I confirmed we're trying to return false there correctly on rotation. However, even though we're returning false there, the orientation changes. I think a more appropriate fix here would be to investigate why autorotation is happening even when we indicate it shouldn't.
@sashaweiss-signal are you sure this only happens when rotating in a specific direction? For me, rotating in both directions (clockwise & counterclockwise) stops the audio message.
Device: iPhone 11 iOS: 18.6.2 Signal Version: 7.74
Yeah still an issue and has been for quite a while