-
Notifications
You must be signed in to change notification settings - Fork 111
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
Preserve PDF annotations even when cache is reset #2965
base: master
Are you sure you want to change the base?
Conversation
refs: MBL-18069 affects: Student release note: PDF annotations is preserved even when cache is reset test plan: See PR description
Release Note:PDF annotations is preserved even when cache is reset Affected Apps: Student
|
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.
QA +1
Tested on iPhone 11, iOS 18.1
Core/Core/Login/LoginSession.swift
Outdated
guard let folderUrl = urls.first(where: { $0.hasDirectoryPath && $0.lastPathComponent == uniqueID }) | ||
else { return } | ||
|
||
print("Moving previously-saved documents folder for session (\(uniqueID)) ..") |
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.
A print
is left here
Core/CoreTests/Files/View/FileDetails/FileDetailsViewControllerTests.swift
Outdated
Show resolved
Hide resolved
…rTests.swift Co-authored-by: Attila Varga <[email protected]>
try? fileManager | ||
.contentsOfDirectory(at: folderUrl, includingPropertiesForKeys: nil) | ||
.forEach({ content in | ||
try fileManager.moveItem(at: content, to: dest.appending(component: content.lastPathComponent)) |
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.
Let's add a filter here because at the moment this will move the Offline
folder as well which we don't want for multiple reasons. I think a filter that moves only folders that contain only numbers (the file id) would be enough.
} | ||
|
||
} catch { | ||
Logger.shared.error("Failure moving previously saved PDFs to AnnotatedPDFs folder: \(error.localizedDescription)") |
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.
We could utilize the new RemoteLogger
to get feedback on this error from real users.
refs: MBL-18069
affects: Student
release note: PDF annotations is preserved even when cache is reset
Test Plan
Video Record
Recording covering PDF annotation persistence scenarios, which are:
pdf_annotations_saving.mov
Checklist