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

Last Viewed Folder Bookmarks Draft -- Not To Be Merged #24113

Conversation

DanielDervishi
Copy link
Collaborator

📜 Tickets

Jira ticket
Github issue

💡 Description

📝 Checklist

You have to check all boxes before merging

  • Filled in the above information (tickets numbers and description of your work)
  • Updated the PR name to follow our PR naming guidelines
  • Wrote unit tests and/or ensured the tests suite is passing
  • When working on UI, I checked and implemented accessibility (minimum Dynamic Text and VoiceOver)
  • If needed, I updated documentation / comments for complex code and public methods
  • If needed, added a backport comment (example @Mergifyio backport release/v120)

Comment on lines +229 to +236
CATransaction.begin()
CATransaction.setDisableActions(true)
self.navigationHandler?.start(
panelType: self.viewModel.selectedPanel ?? .bookmarks,
navigationController: panelNavigationController,
folderPath: path
)
CATransaction.commit()
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Responsible for disabling animations

Comment on lines +249 to +266
private func findPathToFolder(currentFolderGUID: String,
completion: @escaping (_: [String]?) -> Void) {
viewModel.profile.places.getBookmarksTree(rootGUID: BookmarkRoots.MobileFolderGUID,
recursive: true).uponQueue(.main) { result in
guard let maybeBookmarkTreeRoot = result.successValue,
let bookmarkTreeRoot = maybeBookmarkTreeRoot else {
completion(nil)
return
}
guard let path = self.findPathToFolderGivenTree(targetGUID: currentFolderGUID,
treeRootNode: bookmarkTreeRoot),
!path.isEmpty else {
completion(nil)
return
}
completion(path.map({ $0.guid }))
}
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Method that runs asynchronously

Copy link
Contributor

This PR has been automatically marked as stale. Please leave any comment to keep this PR opened. It will be closed automatically if no further update occurs in the next 7 days. Thank you for your contributions!

@github-actions github-actions bot added the stale Stalebot use this label to stale issues and PRs label Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Stalebot use this label to stale issues and PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant