Skip to content

Prevent user from starting LLS in thread#6767

Merged
bmarty merged 1 commit into
developfrom
feature/bma/llsAndThread
May 12, 2026
Merged

Prevent user from starting LLS in thread#6767
bmarty merged 1 commit into
developfrom
feature/bma/llsAndThread

Conversation

@bmarty
Copy link
Copy Markdown
Member

@bmarty bmarty commented May 12, 2026

Content

Prevent user from starting LLS in thread. We only allow sharing the current location in a thread.

Motivation and context

Part of #6764.

Other points of #6764 has to be handled by the SDK, this is done in matrix-org/matrix-rust-sdk#6563

Screenshots / GIFs

Tests

  • enable LLS flag
  • open a room
  • try to share location
  • see that you can start a LLS
  • open a thread
  • try to share location
  • see that you cannot start a LLS

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@bmarty bmarty requested a review from a team as a code owner May 12, 2026 08:03
@bmarty bmarty requested review from jmartinesp and removed request for a team May 12, 2026 08:03
@bmarty bmarty added the PR-Bugfix For bug fix label May 12, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/B1LYD9

@sonarqubecloud
Copy link
Copy Markdown

@codecov
Copy link
Copy Markdown

codecov Bot commented May 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.15%. Comparing base (e49e183) to head (7f54507).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #6767   +/-   ##
========================================
  Coverage    81.15%   81.15%           
========================================
  Files         2647     2647           
  Lines        74042    74045    +3     
  Branches      9579     9581    +2     
========================================
+ Hits         60091    60094    +3     
  Misses       10417    10417           
  Partials      3534     3534           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

Thanks!

}

private fun Timeline.Mode.canShareLiveLocation() = when (this) {
is Timeline.Mode.Thread -> false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should this also exclude pinned events timeline? The current UI won't allow you to start a live location share in that screen, but it may be worth it to explicitly ensure that here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I thought about having all the case in the when statement, but I preferred to keep the code simple. Since there is no composer in Pinned event timeline, I guess it's fine. Maybe Timeline.Mode could have a read-only / writable concept.

@bmarty bmarty merged commit b11fcec into develop May 12, 2026
38 of 39 checks passed
@bmarty bmarty deleted the feature/bma/llsAndThread branch May 12, 2026 12:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR-Bugfix For bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants