-
Notifications
You must be signed in to change notification settings - Fork 91
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
fix: disable sensitive content filtering #43
Conversation
Reviewer's Guide by SourceryThis pull request fixes a connection issue where the app gets stuck on updating/loading when opening a group or profile. The issue was caused by a refactor in the upstream TLRPC. The fix involves updating the code to use the new TL_account classes instead of the old TLRPC classes. Sequence diagram for sensitive content settings updatesequenceDiagram
participant User as User
participant UI as NekoExperimentalSettingsActivity
participant Server as Content Settings Server
User->>UI: Toggle sensitive content filter
UI->>Server: TL_account.setContentSettings(sensitive_enabled)
Note over UI: Show progress dialog
Server-->>UI: Response
UI->>UI: Update UI state
UI->>User: Show updated settings
Class diagram showing content settings refactorclassDiagram
class TL_account {
+setContentSettings
+getContentSettings
+contentSettings
}
class contentSettings {
+boolean sensitive_enabled
+boolean sensitive_can_change
}
note for TL_account "Refactored from TLRPC namespace"
TL_account -- contentSettings
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @risin42 - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@@ -502,10 +503,10 @@ public ArrayList<ThemeDescription> getThemeDescriptions() { | |||
} | |||
|
|||
private void checkSensitive() { | |||
TLRPC.TL_account_getContentSettings req = new TLRPC.TL_account_getContentSettings(); | |||
TL_account.getContentSettings req = new TL_account.getContentSettings(); | |||
getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
issue: Add error handling for the case where the request fails
Currently, if the request fails (error != null), the UI state won't be updated. This could lead to inconsistent state. Consider handling the error case appropriately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm @omg-xtao
Merged, thanks. |
Fixes a connection issue (stuck on updating/loading) caused by an upstream TLRPC refactor.
Steps to reproduce:
Summary by Sourcery
Bug Fixes: