Skip to content

Conversation

@shamim-emon
Copy link
Collaborator

@shamim-emon shamim-emon commented Nov 30, 2025

🪲 Cause of the Bug

  • After importing settings into the preference storage, all PreferenceManager instances continued using outdated preference data until the app was restarted.
  • This happened because
    • preferenceStorages in PreferenceManagers were retriving only old values and missing the imported values.
    • PreferenceManager instances did not observe or react to updates in the underlying preference storage after the import operation.

✅ Solution

  • Injected StoragePersister into each PreferenceManager so that they always fetch the latest preference storage instance, ensuring updated values are returned immediately.
  • Made PreferenceManager instances notifiable and updated their configuration flows to refresh themselves when notified.
  • After importing settings, the system now triggers notifications to all PreferenceManager instances, prompting them to reload the latest configuration from the updated preference storage.

@shamim-emon shamim-emon requested a review from a team as a code owner November 30, 2025 21:50
@shamim-emon shamim-emon requested a review from asoucar November 30, 2025 21:50
@shamim-emon shamim-emon requested a review from wmontwe November 30, 2025 22:21
@shamim-emon shamim-emon assigned wmontwe and unassigned asoucar Nov 30, 2025
@shamim-emon shamim-emon removed the request for review from asoucar November 30, 2025 22:22
@wmontwe wmontwe added merge block: soft freeze PR to main is blocked: risky code or feature flag enablement must wait until soft freeze lifts. and removed merge block: soft freeze PR to main is blocked: risky code or feature flag enablement must wait until soft freeze lifts. labels Dec 4, 2025
Copy link
Member

@wmontwe wmontwe left a comment

Choose a reason for hiding this comment

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

Thank, just a duplication in DefaultGeneralSettingsManager.

private val debugLogConfigurator: DebugLogConfigurator,
private val backgroundDispatcher: CoroutineDispatcher = Dispatchers.IO,
private val platformConfigProvider: PlatformConfigProvider,
private val preferenceChangePublisher: PreferenceChangePublisher,
Copy link
Member

Choose a reason for hiding this comment

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

There is already a changePublisher above -> line 46

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

updated!

@shamim-emon shamim-emon force-pushed the fix-issue-10149 branch 2 times, most recently from cc286e9 to 27b1acb Compare December 5, 2025 19:28
Copy link
Member

@wmontwe wmontwe left a comment

Choose a reason for hiding this comment

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

Thank you!

@wmontwe wmontwe merged commit f0687e4 into thunderbird:main Dec 8, 2025
12 checks passed
@thunderbird-botmobile thunderbird-botmobile bot added this to the Thunderbird 17 milestone Dec 8, 2025
@shamim-emon shamim-emon deleted the fix-issue-10149 branch December 8, 2025 10:02
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.

When exporting and importing "General settings" some settings are not preserved as they should be

3 participants