Skip to content

Commit

Permalink
Fix for review
Browse files Browse the repository at this point in the history
  • Loading branch information
cuba committed Jul 9, 2024
1 parent 6d07cfd commit 4819f30
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -383,8 +383,7 @@ extension BrowserViewController: TopToolbarDelegate {
) { [weak self, weak selectedTab] action in
switch action {
case .navigate(let target, let dismiss):
guard let self else { return }
guard let selectedTab else { return }
guard let self, let selectedTab else { return }
if dismiss {
weakPopover?.dismiss(animated: true) {
self.navigate(to: target, tab: selectedTab, url: url, on: nil)
Expand Down Expand Up @@ -461,10 +460,8 @@ extension BrowserViewController: TopToolbarDelegate {
profile: self.profile,
tabManager: self.tabManager,
feedDataSource: self.feedDataSource,
historyAPI: self.braveCore.historyAPI,
p3aUtilities: self.braveCore.p3aUtils,
deAmpPrefs: self.braveCore.deAmpPrefs,
debounceService: DebounceServiceFactory.get(privateMode: false),
braveCore: braveCore,
clearDataCallback: { [weak self] isLoading, isHistoryCleared in
guard let self else { return }
guard let view = self.navigationController?.view, view.window != nil else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,12 @@ import os
profile: Profile,
tabManager: TabManager,
feedDataSource: FeedDataSource,
historyAPI: BraveHistoryAPI,
p3aUtilities: BraveP3AUtils,
deAmpPrefs: DeAmpPrefs,
debounceService: DebounceService?,
braveCore: BraveCoreMain,
clearDataCallback: @escaping ClearDataCallback
) {
self.p3aUtilities = p3aUtilities
self.deAmpPrefs = deAmpPrefs
self.p3aUtilities = braveCore.p3aUtils
self.deAmpPrefs = braveCore.deAmpPrefs
self.debounceService = debounceService
self.tabManager = tabManager
self.isP3AEnabled = p3aUtilities.isP3AEnabled
Expand All @@ -123,7 +121,7 @@ import os
var clearableSettings = [
ClearableSetting(
id: .history,
clearable: HistoryClearable(historyAPI: historyAPI),
clearable: HistoryClearable(historyAPI: braveCore.historyAPI),
isEnabled: true
),
ClearableSetting(id: .cache, clearable: CacheClearable(), isEnabled: true),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,10 +277,8 @@ class SettingsViewController: TableViewController {
profile: self.profile,
tabManager: self.tabManager,
feedDataSource: self.feedDataSource,
historyAPI: self.historyAPI,
p3aUtilities: self.p3aUtilities,
deAmpPrefs: deAmpPrefs,
debounceService: DebounceServiceFactory.get(privateMode: false),
braveCore: braveCore,
clearDataCallback: { [weak self] isLoading, isHistoryCleared in
guard let view = self?.navigationController?.view, view.window != nil else {
assertionFailure()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,10 @@ struct ShieldsPanelView: View {
@ViewBuilder @MainActor private var headerView: some View {
VStack(alignment: .center, spacing: 8) {
HStack(alignment: .center, spacing: 8) {
favicon
.resizable()
.aspectRatio(contentMode: .fit)
.cornerRadius(4)
.frame(width: 24, height: 24, alignment: .center)
FaviconImage(
url: url.absoluteString,
isPrivateBrowsing: viewModel.isPrivateBrowsing
)
Text(displayHost)
.font(.title2)
.foregroundStyle(Color(.bravePrimary))
Expand Down

0 comments on commit 4819f30

Please sign in to comment.