-
Notifications
You must be signed in to change notification settings - Fork 927
[PM-26909] Implement screen capture toggle authenticator #6033
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
[PM-26909] Implement screen capture toggle authenticator #6033
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #6033 +/- ##
==========================================
+ Coverage 84.72% 84.81% +0.09%
==========================================
Files 722 720 -2
Lines 54717 54619 -98
Branches 7583 7583
==========================================
- Hits 46358 46326 -32
+ Misses 5706 5637 -69
- Partials 2653 2656 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Great job! No new security vulnerabilities introduced in this pull request |
| /** | ||
| * A set of Bitwarden account IDs that have previously been synced. | ||
| * Whether or not screen capture is allowed for the current user. | ||
| */ | ||
| var previouslySyncedBitwardenAccountIds: Set<String> | ||
| val isScreenCaptureAllowedStateFlow: StateFlow<Boolean> | ||
|
|
||
| /** | ||
| * Whether or not screen capture is allowed for the current user. | ||
| * A set of Bitwarden account IDs that have previously been synced. | ||
| */ | ||
| val isScreenCaptureAllowedStateFlow: StateFlow<Boolean> |
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.
Is this change intentional?
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.
yes, I moved isScreenCaptureAllowedStateFlow to be right after the isScreenCaptureAllowed.
There was previouslySyncedBitwardenAccountIds between them, very minor but made me not see it immediately
| BitwardenTwoButtonDialog( | ||
| title = stringResource(BitwardenString.allow_screen_capture), | ||
| message = stringResource( | ||
| BitwardenString.are_you_sure_you_want_to_enable_screen_capture, |
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.
Can we add the name here
| ) | ||
| } | ||
|
|
||
| ScreenCaptureRow( |
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.
You're missing the 8dp spacer before this item
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.
Unless the intention is to make this a single card?
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.
It is missing
|
|
||
| is SettingsAction.SecurityClick.AllowScreenCaptureToggle -> { | ||
| settingsRepository.isScreenCaptureAllowed = action.enabled | ||
| mutableStateFlow.update { it.copy(allowScreenCapture = action.enabled) } |
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.
This should be in a handleAllowScreenCaptureToggle() function
| } | ||
| } | ||
|
|
||
| @Suppress("MaxLineLength") |
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.
This suppression is not needed
| @Composable | ||
| private fun ScreenCaptureRow( | ||
| currentValue: Boolean, | ||
| hasBiometrics: Boolean, |
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.
Can we pass in the cardStyle instead, there is no reason this composable needs to know about biometrics
| is SettingsAction.SecurityClick.AllowScreenCaptureToggle -> { | ||
| settingsRepository.isScreenCaptureAllowed = action.enabled | ||
| mutableStateFlow.update { it.copy(allowScreenCapture = action.enabled) } | ||
| handleAllowScreenCaptureToggle(action) |
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.
Thanks for that! 😄

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-26909
📔 Objective
Add screen capture toggle for Authenticator
⏰ Reminders before review
📸 Screenshots
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes