Skip to content

Commit

Permalink
#8483 Bottom toolbar controls for bookmarks in Library Panel (#8551)
Browse files Browse the repository at this point in the history
  • Loading branch information
adudenamedruby authored May 27, 2021
1 parent bb583f5 commit 22cb334
Show file tree
Hide file tree
Showing 5 changed files with 270 additions and 167 deletions.
4 changes: 4 additions & 0 deletions Client.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@
C8399D9122DE5E5200EFA5CA /* disconnect-block-advertising.json in Resources */ = {isa = PBXBuildFile; fileRef = C8399D8F22DE5E5200EFA5CA /* disconnect-block-advertising.json */; };
C8399D9322DE5E5B00EFA5CA /* disconnect-block-analytics.json in Resources */ = {isa = PBXBuildFile; fileRef = C8399D9222DE5E5B00EFA5CA /* disconnect-block-analytics.json */; };
C8399D9522DE5E6200EFA5CA /* disconnect-block-social.json in Resources */ = {isa = PBXBuildFile; fileRef = C8399D9422DE5E6200EFA5CA /* disconnect-block-social.json */; };
C8417D222657F0600010B877 /* LibraryViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8417D212657F0600010B877 /* LibraryViewModel.swift */; };
C8445A14264428DC00B83F53 /* LibraryPanelViewState.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8445A13264428DC00B83F53 /* LibraryPanelViewState.swift */; };
C8445AD126443C7F00B83F53 /* LibraryPanelViewStateTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8445AD026443C7F00B83F53 /* LibraryPanelViewStateTests.swift */; };
C8611C8E1F71904C00C3DE7D /* DiskImageStoreTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D3BF8CBC1B7472FA0007AFE6 /* DiskImageStoreTests.swift */; };
Expand Down Expand Up @@ -2986,6 +2987,7 @@
C8399D8F22DE5E5200EFA5CA /* disconnect-block-advertising.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "disconnect-block-advertising.json"; sourceTree = "<group>"; };
C8399D9222DE5E5B00EFA5CA /* disconnect-block-analytics.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "disconnect-block-analytics.json"; sourceTree = "<group>"; };
C8399D9422DE5E6200EFA5CA /* disconnect-block-social.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = "disconnect-block-social.json"; sourceTree = "<group>"; };
C8417D212657F0600010B877 /* LibraryViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryViewModel.swift; sourceTree = "<group>"; };
C8445A13264428DC00B83F53 /* LibraryPanelViewState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryPanelViewState.swift; sourceTree = "<group>"; };
C8445AD026443C7F00B83F53 /* LibraryPanelViewStateTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LibraryPanelViewStateTests.swift; sourceTree = "<group>"; };
C8464093BC0470D518B16C72 /* af */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = af; path = af.lproj/3DTouchActions.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4307,6 +4309,7 @@
isa = PBXGroup;
children = (
F84B22221A09122500AAB793 /* LibraryViewController.swift */,
C8417D212657F0600010B877 /* LibraryViewModel.swift */,
274A36CD239EB9EC00A21587 /* LibraryViewController+LibraryPanelDelegate.swift */,
C8445A13264428DC00B83F53 /* LibraryPanelViewState.swift */,
);
Expand Down Expand Up @@ -7821,6 +7824,7 @@
E63ED8E11BFD25580097D08E /* LoginListViewController.swift in Sources */,
D0625CA8208FC47A0081F3B2 /* BrowserViewController+DownloadQueueDelegate.swift in Sources */,
2F44FCC71A9E8CF500FD20CC /* SearchSettingsTableViewController.swift in Sources */,
C8417D222657F0600010B877 /* LibraryViewModel.swift in Sources */,
39A359E41BFCCE94006B9E87 /* UserActivityHandler.swift in Sources */,
D88FDAAF1F4E2BA000FD9709 /* PhotonActionSheetAnimator.swift in Sources */,
43AB6FA325DC53D30016B015 /* ASFooterView.swift in Sources */,
Expand Down
5 changes: 3 additions & 2 deletions Client/Frontend/Browser/BrowserViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -853,8 +853,9 @@ class BrowserViewController: UIViewController {
libraryViewController.selectedPanel = panel
}

libraryViewController.modalPresentationStyle = .formSheet
self.present(libraryViewController, animated: true, completion: nil)
let controller: DismissableNavigationViewController
controller = DismissableNavigationViewController(rootViewController: libraryViewController)
self.present(controller, animated: true, completion: nil)
}

fileprivate func createSearchControllerIfNeeded() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension LibraryViewController: LibraryPanelDelegate {
// (e.g., "http://foo.com/bar/?query=%s"), and this will get them the same behavior as if
// they'd copied and pasted into the URL bar.
// See BrowserViewController.urlBar:didSubmitText:.
guard let url = URIFixup.getURL(url) ?? profile.searchEngines.defaultEngine.searchURLForQuery(url) else {
guard let url = URIFixup.getURL(url) ?? viewModel.profile.searchEngines.defaultEngine.searchURLForQuery(url) else {
Logger.browserLogger.warning("Invalid URL, and couldn't generate a search URL for it.")
return
}
Expand Down
Loading

0 comments on commit 22cb334

Please sign in to comment.