Skip to content

Ensure that only one DataStore is active for the same file. #5198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 21, 2025

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Aug 21, 2025

Content

Ensure that only one DataStore is active for the same file.

Motivation and context

Fix crash on element pro, where a class using DefaultPreferencesDataStoreFactory was not declared as a singleton.

Screenshots / GIFs

Tests

  • Using Element Pro, sign out. If no crash occurs, the bug is fixed.

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • 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 define 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 August 21, 2025 10:04
@bmarty bmarty requested review from jmartinesp and removed request for a team August 21, 2025 10:04
@bmarty bmarty added the PR-Bugfix For bug fix label Aug 21, 2025
Copy link
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!

Copy link
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/MRftQ2

Copy link

@bmarty bmarty enabled auto-merge August 21, 2025 10:30
@bmarty bmarty merged commit 44d0111 into develop Aug 21, 2025
34 checks passed
@bmarty bmarty deleted the fix/fixCrashOnPro branch August 21, 2025 10:31
Copy link

codecov bot commented Aug 21, 2025

Codecov Report

❌ Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.15%. Comparing base (033b6fd) to head (a9c01a8).
⚠️ Report is 14 commits behind head on develop.

Files with missing lines Patch % Lines
...s/impl/store/DefaultPreferencesDataStoreFactory.kt 0.00% 4 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5198      +/-   ##
===========================================
- Coverage    80.16%   80.15%   -0.01%     
===========================================
  Files         2234     2234              
  Lines        61206    61209       +3     
  Branches      7760     7760              
===========================================
  Hits         49065    49065              
- Misses        9302     9305       +3     
  Partials      2839     2839              

☔ 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.

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