Skip to content

Comments

Fix incorrect PreferenceStorage API usage in HomeViewModel and ConversationActivityV2#1999

Closed
Copilot wants to merge 2 commits intoupdate-pref-usefrom
copilot/sub-pr-1977
Closed

Fix incorrect PreferenceStorage API usage in HomeViewModel and ConversationActivityV2#1999
Copilot wants to merge 2 commits intoupdate-pref-usefrom
copilot/sub-pr-1977

Conversation

Copy link

Copilot AI commented Feb 24, 2026

Two files were using the old TextSecurePreferences API instead of the new PreferenceStorage system after the preference refactoring.

Changes

  • HomeViewModel.kt: Fixed PushPreferences.isPushEnabled(TextSecurePreferences.pushSuffix)PushPreferences.IS_PUSH_ENABLED

    • The isPushEnabled() function doesn't exist in PushPreferences; the suffix is already embedded in the PreferenceKey constant
  • ConversationActivityV2.kt:

    • Removed unused import of TextSecurePreferences.Companion.CALL_NOTIFICATIONS_ENABLED
    • Updated intent extra to use NotificationPreferences.CALL_NOTIFICATIONS_ENABLED.name for proper PreferenceKey serialization
// Before
&& !prefStorage[PushPreferences.isPushEnabled(TextSecurePreferences.pushSuffix)]
intent.putExtra(SCROLL_AND_TOGGLE_KEY, CALL_NOTIFICATIONS_ENABLED)

// After  
&& !prefStorage[PushPreferences.IS_PUSH_ENABLED]
intent.putExtra(SCROLL_AND_TOGGLE_KEY, NotificationPreferences.CALL_NOTIFICATIONS_ENABLED.name)

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Co-authored-by: SessionHero01 <180888785+SessionHero01@users.noreply.github.com>
Copy link
Author

Copilot AI commented Feb 24, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • api.foojay.io
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java -Xmx64m -Xms64m -Dorg.gradle.appname=gradlew -jar /home/REDACTED/work/session-android/session-android/gradle/wrapper/gradle-wrapper.jar :app:compilePlayDebugKotlin --no-daemon (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Refactor preference storage system and tidy up Fix incorrect PreferenceStorage API usage in HomeViewModel and ConversationActivityV2 Feb 24, 2026
Copilot AI requested a review from SessionHero01 February 24, 2026 02:28
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.

2 participants