Skip to content

Conversation

mogwai
Copy link

@mogwai mogwai commented Sep 9, 2025

Changes:

  1. Added isVoiceInteractionActive computed property to ConversationInputToolbar that checks if voice memo is in active state (not idle/draft)
  2. Added orientation lock logic to ConversationViewController.shouldAutorotate that prevents rotation during voice interactions
  3. Both changes work together to fix autorotation issues during voice memo usage

First time contributor checklist

Contributor checklist

  • My commits are rebased on the latest main branch
  • My commits are in nice logical chunks
  • My contribution is fully baked and is ready to be merged as is
  • I have tested my contribution on these devices:
  • iPhone 15 Pro Max

Description

Fixing #6021 #4359

```
Fix device orientation during voice memo interactions

- Add isVoiceInteractionActive property to ConversationInputToolbar
- Prevent autorotation during active voice memo recording/playback
- Check voice interaction state in shouldAutorotate override
```

**Changes:**
1. Added `isVoiceInteractionActive` computed property to `ConversationInputToolbar` that checks if voice memo is in active state (not idle/draft)
2. Added orientation lock logic to `ConversationViewController.shouldAutorotate` that prevents rotation during voice interactions
3. Both changes work together to fix autorotation issues during voice memo usage
@mogwai mogwai changed the title **Commit message:** Fix Autoratotation stopping voice recording Sep 9, 2025
@sashaweiss-signal
Copy link
Contributor

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?

@sashaweiss-signal
Copy link
Contributor

Actually, I am able to reproduce specifically with a clockwise rotation, but not counter-clockwise.

@sashaweiss-signal
Copy link
Contributor

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.

@tr1ng0
Copy link

tr1ng0 commented Sep 9, 2025

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants