[SES-4612] - Fetch initial config from whole swarm#1928
Merged
SessionHero01 merged 12 commits intodevfrom Feb 12, 2026
Merged
Conversation
Collaborator
SessionHero01
commented
Feb 12, 2026
- Renamed and new pref framework
- Error handling
- More type of key
- Preference storage
- Onboarding preferences
- Poller logic
- Preference cache
ThomasSession
approved these changes
Feb 12, 2026
There was a problem hiding this comment.
Pull request overview
Introduces a new PreferenceStorage abstraction backed by SharedPreferences and migrates seed-viewed + poller state to typed preference keys, while updating pollers to fetch initial user profile config from the whole swarm.
Changes:
- Added typed preference framework (
PreferenceKey,PreferenceStorage) with a SharedPreferences-backed implementation and Hilt module. - Migrated “has viewed seed” reads/writes to the new storage across onboarding/home/recovery flows.
- Updated poller logic to perform an initial USER_PROFILE fetch across the entire swarm and adjusted first-poll parameter naming.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPasswordViewModel.kt | Switches seed viewed tracking to typed PreferenceStorage. |
| app/src/main/java/org/thoughtcrime/securesms/recoverypassword/RecoveryPasswordActivity.kt | Marks seed as viewed via new preference storage. |
| app/src/main/java/org/thoughtcrime/securesms/preferences/SharedPreferenceStorage.kt | Adds SharedPreferences-backed PreferenceStorage with caching + change notifications. |
| app/src/main/java/org/thoughtcrime/securesms/preferences/PreferencesModule.kt | Provides singleton PreferenceStorage via Hilt. |
| app/src/main/java/org/thoughtcrime/securesms/preferences/PreferenceStorage.kt | Defines the new preference storage interface (get/set/remove/watch). |
| app/src/main/java/org/thoughtcrime/securesms/preferences/PreferenceKey.kt | Adds typed preference keys with strategies (primitive/json/enum). |
| app/src/main/java/org/thoughtcrime/securesms/onboarding/manager/LoadAccountManager.kt | Migrates “has viewed seed” set to new storage. |
| app/src/main/java/org/thoughtcrime/securesms/onboarding/OnBoardingPreferences.kt | Introduces onboarding preference keys (HAS_VIEWED_SEED). |
| app/src/main/java/org/thoughtcrime/securesms/home/HomeViewModel.kt | Uses new storage to decide whether to show seed reminder banner. |
| app/src/main/java/org/thoughtcrime/securesms/home/HomeActivity.kt | Uses new storage to show/hide seed reminder view. |
| app/src/main/java/org/thoughtcrime/securesms/groups/GroupPoller.kt | Renames first-poll parameter for clarity. |
| app/src/main/java/org/session/libsession/utilities/TextSecurePreferences.kt | Removes seed-viewed + multipart migration prefs from legacy interface. |
| app/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/Poller.kt | Adds initial profile polling across whole swarm + migrates state to PreferenceStorage. |
| app/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/OpenGroupPoller.kt | Renames first-poll parameter for clarity. |
| app/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/BasePoller.kt | Renames first-poll parameter in base poller contract. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
app/src/main/java/org/thoughtcrime/securesms/preferences/SharedPreferenceStorage.kt
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/preferences/SharedPreferenceStorage.kt
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/preferences/SharedPreferenceStorage.kt
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/preferences/SharedPreferenceStorage.kt
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/preferences/SharedPreferenceStorage.kt
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/preferences/SharedPreferenceStorage.kt
Show resolved
Hide resolved
app/src/main/java/org/session/libsession/messaging/sending_receiving/pollers/Poller.kt
Show resolved
Hide resolved
app/src/main/java/org/thoughtcrime/securesms/preferences/PreferenceKey.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.