Skip to content

Bugfix/noid/use extra shortcut id only when supported#6094

Merged
mahibi merged 2 commits intomasterfrom
bugfix/noid/use_EXTRA_SHORTCUT_ID_onlyWhenSupported
Apr 20, 2026
Merged

Bugfix/noid/use extra shortcut id only when supported#6094
mahibi merged 2 commits intomasterfrom
bugfix/noid/use_EXTRA_SHORTCUT_ID_onlyWhenSupported

Conversation

@mahibi
Copy link
Copy Markdown
Collaborator

@mahibi mahibi commented Apr 20, 2026

followup to #6024

  • resolve detect warnings

🏁 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?)

@mahibi mahibi self-assigned this Apr 20, 2026
Copilot AI review requested due to automatic review settings April 20, 2026 11:26
@mahibi mahibi added the 3. to review Waiting for reviews label Apr 20, 2026
EXTRA_SHORTCUT_ID is only available in Android 10 (Q)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi force-pushed the bugfix/noid/use_EXTRA_SHORTCUT_ID_onlyWhenSupported branch from eafee5d to 16eb6e6 Compare April 20, 2026 11:27
@mahibi mahibi requested a review from sowjanyakch April 20, 2026 11:28
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Follow-up bugfix to Direct Share shortcut handling and lint/detekt warning suppression, ensuring shortcut IDs are only accessed when supported and suppressing long-parameter warnings in Compose UI code.

Changes:

  • Added/adjusted @Suppress annotations for Detekt/lint warnings in chat UI composables.
  • Added an SDK version gate before reading Intent.EXTRA_SHORTCUT_ID when handling ACTION_SEND in ConversationsListActivity.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/src/main/java/com/nextcloud/talk/ui/chat/ChatMessageScaffold.kt Updates suppression annotations to address Detekt warnings (long method/parameter list).
app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt Gates reading EXTRA_SHORTCUT_ID behind an SDK check for Direct Share intent handling.
Comments suppressed due to low confidence (1)

app/src/main/java/com/nextcloud/talk/conversationlist/ConversationsListActivity.kt:336

  • The new API-level gate (>= Q) prevents handling Direct Share shortcut selection on Android 8–9 (API 26–28), even though the app’s minSdk is 26 and sharing shortcuts exist there. Consider reading the shortcut id using the API 25+ constant (e.g., ShortcutManager.EXTRA_SHORTCUT_ID) and gating on N_MR1 (or removing the gate entirely given minSdk 26), instead of requiring Q.
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && hasActivityActionSendIntent()) {
            val shortcutId = intent.getStringExtra(Intent.EXTRA_SHORTCUT_ID)
            if (shortcutId != null) {
                pendingDirectShareToken = DirectShareHelper.extractTokenFromShortcutId(shortcutId)
            }

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/24663965800/artifacts/6530562978
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)

.. to resolve detekt warnings..

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi force-pushed the bugfix/noid/use_EXTRA_SHORTCUT_ID_onlyWhenSupported branch from 16eb6e6 to 7c5e3b1 Compare April 20, 2026 12:52
@github-actions
Copy link
Copy Markdown
Contributor

APK file: https://github.com/nextcloud/talk-android/actions/runs/24667554244/artifacts/6532108074
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)

@github-actions
Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings8888
Errors00

SpotBugs

CategoryBaseNew
Bad practice66
Correctness1010
Dodgy code5353
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total8080

@mahibi mahibi merged commit ca8ed38 into master Apr 20, 2026
16 of 17 checks passed
@mahibi mahibi deleted the bugfix/noid/use_EXTRA_SHORTCUT_ID_onlyWhenSupported branch April 20, 2026 13:10
@AndyScherzinger AndyScherzinger added this to the 24.0.0 milestone Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants