-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Request personal data copy change #642
Conversation
…request-personal-data-copy-change
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.
Looking good, @cdolm92 . I just left a small suggestion to improve the readability of an existent code.
let exportEnvelope = initialUser | ||
.switchMap { _ in | ||
AppEnvironment.current.apiService.exportDataState() | ||
.demoteErrors() | ||
} | ||
|
||
self.showRequestDataPrompt = exportEnvelope | ||
self.showRequestDataPrompt = Signal.combineLatest(exportEnvelope, requestDataAlertText) | ||
.filter { $0.0.dataUrl == nil || $0.0.state == .expired || $0.0.expiresAt == nil } |
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.
Since you touched this code, I think we can improve the readability of it by extracting the logic to a new function
private func canRequestData(_ envelope: ExportDataEnvelope) -> Bool {
return envelope.dataUrl == nil || envelope.state == .expired || envelope.expiresAt == nil
}
and simply filter using .filter { canRequestData(0.0) }
…request-personal-data-copy-change
📲 What
New copy informs user of specific email account to check when requesting their data.
🛠 How
Graph call to fetch user email in
SettingsRequestDataCellViewModel
👀 See
✅ Acceptance criteria
Settings > Account > Privacy > Request my Personal Data