Skip to content

fix: navigate back to primary task when leaving permanent call room#6235

Merged
mahibi merged 1 commit into
masterfrom
bugfix/noid/fixPermanentCallRoomMultipleAppInstances
May 28, 2026
Merged

fix: navigate back to primary task when leaving permanent call room#6235
mahibi merged 1 commit into
masterfrom
bugfix/noid/fixPermanentCallRoomMultipleAppInstances

Conversation

@mahibi
Copy link
Copy Markdown
Collaborator

@mahibi mahibi commented May 28, 2026

The permanent call rooms implementation is a bit complex which causes multiple app instances being opened.
This PR will fix the problem with the multiple app instances, however it adds more complexity. For now, this should be the best solution but we may have to think about an other approach for permanent call rooms.
Also, this fix requires API level 29 which is a problem.

What was done in this PR:

When multiple app instances run in separate tasks (e.g. opened via a notification), leaving a voice/permanent call room previously started a new ConversationsListActivity on top of the call task instead of returning to the existing app task. This caused duplicate task stacks.

Now the call task finds the existing primary task (preferring one rooted at MainActivity) and navigates it to ConversationsListActivity, removes any stray non-call tasks, and uses finishAndRemoveTask() to fully clean up the call task. Falls back to launching MainActivity fresh if no existing task is found.

AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

When multiple app instances run in separate tasks (e.g. opened via a
notification), leaving a voice/permanent call room previously started a
new ConversationsListActivity on top of the call task instead of
returning to the existing app task. This caused duplicate task stacks.

Now the call task finds the existing primary task (preferring one rooted
at MainActivity) and navigates it to ConversationsListActivity, removes
any stray non-call tasks, and uses finishAndRemoveTask() to fully clean
up the call task. Falls back to launching MainActivity fresh if no
existing task is found.

AI-assistant: Claude Code v2.1.142 (Claude Sonnet 4.6)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi added this to the 24.0.0 milestone May 28, 2026
@mahibi mahibi requested a review from rapterjet2004 May 28, 2026 12:19
@mahibi mahibi self-assigned this May 28, 2026
@github-actions
Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/26574220445/artifacts/7266756672
To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.
qrcode (please click on link to get QR code displayed)

@mahibi mahibi merged commit 2a141f9 into master May 28, 2026
12 of 17 checks passed
@mahibi mahibi deleted the bugfix/noid/fixPermanentCallRoomMultipleAppInstances branch May 28, 2026 13:22
@AndyScherzinger
Copy link
Copy Markdown
Member

/backport to stable-24.0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants