Draft
Conversation
WalkthroughAdds two string-array resources for notification mode titles and values, a notification vector drawable, and a ListPreference Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@app/src/main/res/values/strings.xml`:
- Around line 70-79: The three description resources
(notification_mode_auto_description, notification_mode_fcm_only_description,
notification_mode_sse_only_description) are unused because the ListPreference in
notification_preferences.xml uses app:useSimpleSummaryProvider="true" which only
shows the selected title from notification_modes_titles; either remove the
unused strings or wire them into the UI: to wire them, replace
useSimpleSummaryProvider with an entrySummaries array (or set android:summary to
reference entrySummaries) that maps to these three description strings, or
implement a custom SummaryProvider in your PreferenceFragmentCompat (in the
fragment class that loads notification_preferences.xml) to set the
ListPreference summary based on the selected value and the corresponding
description resource; update the ListPreference declaration (same preference
key/name as the existing ListPreference) or the fragment's onCreatePreferences
logic to point to notification_mode_auto_description,
notification_mode_fcm_only_description, and
notification_mode_sse_only_description so they are actually displayed.
In `@app/src/main/res/xml/root_preferences.xml`:
- Around line 26-29: The Preference element for NotificationSettingsFragment
uses a hardcoded summary and lacks an icon; add a new string resource named
notification_delivery_mode_selection in strings.xml with the English text, then
update the Preference (the element with
app:fragment="me.capcom.smsgateway.ui.settings.NotificationSettingsFragment") to
use android:summary="@string/notification_delivery_mode_selection" and add the
same android:icon attribute pattern used by the other preferences (match their
drawable resource) so the preference is localizable and visually consistent.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@app/src/main/res/xml/cloud_server_preferences.xml`:
- Around line 15-22: The ListPreference element using android:icon should be
changed to use the AndroidX attribute app:icon for consistency with other
preferences; locate the ListPreference with key "gateway.notification_mode" and
replace the android:icon attribute with app:icon="@drawable/ic_notifications" so
the Preference (ListPreference) uses the androidx preference attribute namespace
like the EditTextPreference entries.
de5bcec to
6e0d6b5
Compare
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.
Summary by CodeRabbit
New Features
New Resources
Style
✏️ Tip: You can customize this high-level summary in your review settings.