Skip to content
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

Fixes #401 Only NEWNYM Through UI When Sensible #402

Merged
merged 2 commits into from
Oct 20, 2020
Merged

Fixes #401 Only NEWNYM Through UI When Sensible #402

merged 2 commits into from
Oct 20, 2020

Conversation

bitmold
Copy link
Collaborator

@bitmold bitmold commented Oct 16, 2020

  • The "NEW IDENTITY" button in the notification is only visible when the user can click on it
  • Clicking the refresh button in the main app gives you a new identity if you have one, does nothing if Tor is starting, and starts tor if it's off/stopping

- The "NEW IDENTITY" button in the notification is only visible when the user can click on it
- Clicking the refresh button in the main app gives you a new identity if you have one, does nothing if Tor is starting, and starts tor if it's off/stopping
@@ -223,64 +225,45 @@ private void createNotificationChannel() {
mNotificationManager.createNotificationChannel(mChannel);
}

@SuppressLint("NewApi")
@SuppressLint({"NewApi", "RestrictedApi"})
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This RestrictedApi thing is the call to mNotifyBuilder.mActions.clear() which IMO is fine to do. Normally you wouldn't need to clear actions because you wouldn't hang on to a notify builder object like we do here, but anyway ya I think it's fine tbh.

@n8fr8 n8fr8 merged commit 07e7794 into guardianproject:master Oct 20, 2020
@bitmold bitmold deleted the newnym_ui_fixes branch October 24, 2020 23:10
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.

None yet

2 participants