Skip to content

Commit

Permalink
fix toolbar icon and fix a few warnings (#31)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/1144193759412024/1204184574938009/f
Tech Design URL:
CC:

Description:

fix toolbar icon and fix a few warnings

Steps to test this PR:

Install the Safari extension and enable it
Ensure DDG icon shown next to address bar and in the "customise toolbar" view
  • Loading branch information
brindy committed Mar 24, 2023
1 parent ce03b5c commit e62c366
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 6 deletions.
Binary file modified SafariAppExtension/Dashboard/Support/ToolbarIcon.pdf
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@ class RequestsDetailViewModel: ObservableObject {

}

// swiftlint:disable function_body_length
func updateState() {
guard let pageData = pageData, !isNewTab else { return }

Expand Down Expand Up @@ -224,7 +223,6 @@ class RequestsDetailViewModel: ObservableObject {
}

}
// swiftlint:enable function_body_length

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class TrackersDetailViewModel: ObservableObject {
blockedEntities = EntityDetailsModel.entityDetailsFromTrackers(pageData.blockedTrackers)
}

// swiftlint:disable function_body_length
func updateState() {
guard let pageData = pageData, !isNewTab else { return }

Expand Down Expand Up @@ -132,6 +131,5 @@ class TrackersDetailViewModel: ObservableObject {
}

}
// swiftlint:enable function_body_length

}
2 changes: 1 addition & 1 deletion SafariAppExtension/Extension/SafariExtensionActor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ actor SafariExtensionActor {
guard let activePage = await activeWindow.activeTab()?.activePage(),
let properties = await activePage.properties(),
let url = properties.url else {
await SafariExtensionViewController.shared.dismissPopover()
SafariExtensionViewController.shared.dismissPopover()
toolbarItem.setImage(ToolbarIcon.currentIcon)
return
}
Expand Down
2 changes: 1 addition & 1 deletion UnitTests/TrackerDetectionTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ import XCTest
@testable import TrackerBlocking
@testable import TrackerRadarKit

/// This is subject to change once known trackers are available to the app.
// swiftlint:disable type_body_length
/// This is subject to change once known trackers are available to the app.
class TrackerDetectionTests: XCTestCase {

struct TestCase: Codable {
Expand Down

0 comments on commit e62c366

Please sign in to comment.