Skip to content

Commit

Permalink
Merge branch 'develop' into sam/netp-waitlist
Browse files Browse the repository at this point in the history
* develop:
  Update NetP endpoint (#1459)
  Add support for syncing Credentials (#1368)
  Fix dsym upload to S3
  Bump version to 1.51.1 (48)
  Report failed unit tests to Asana (#1457)
  Use MainActor to ensure FutureExtension tests are dispatched on main queue (#1472)
  Move Make /Applications symlink build phase to later (#1470)
  don't show day 7 when day 0 has been dismissed (#1468)
  Update BSK with autofill 8.1.2 (#1471)
  Add job to create a task on asana if tests fails on develop (#1461)
  Disables a flaky test from App Store unit tests (#1467)
  Fix an autoconsent exception on old Safari (#1460)
  fix bug where wrong address bar text is shown when opening DuckPlayer… (#1434)
  Fix FutureExtensionTests (#1450)
  Add pixel to determine Bitwarden use on Mac (#1412)
  Encapsulate NetP subjects within observers (#1436)
  Skip /Applications symlink script for Debug builds (#1443)
  • Loading branch information
samsymons committed Aug 13, 2023
2 parents 9677df5 + 0ad1a91 commit 9df76fc
Show file tree
Hide file tree
Showing 53 changed files with 952 additions and 324 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build_notarized.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ on:
required: true
MM_WEBHOOK_URL:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true


jobs:
export-notarized-app:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,19 @@ jobs:
check_name: "Test Report: ${{ matrix.flavor }}"
report_paths: ${{ matrix.flavor }}.xml

- name: Update Asana with failed unit tests
if: always() # always run even if the previous step fails
env:
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
# Extract failed tests from the junit report
# Only keep failures unique by classname and name (column 1 and 2 of the yq output)
yq < ${{ matrix.flavor }}.xml -p xml -o json -r \
$'[.testsuites.testsuite[].testcase] | flatten | map(select(.failure) | .+@classname + " " + .+@name + " \'" + .failure.+@message + "\' ${{ env.WORKFLOW_URL }}") | .[]' \
| sort -u -k 1,2 \
| xargs -L 1 ./scripts/report-failed-unit-test.sh
- name: Upload failed test log
uses: actions/upload-artifact@v3
if: failure()
Expand Down Expand Up @@ -303,3 +316,24 @@ jobs:
run: |
git update-index --refresh
git diff-index --quiet HEAD --
asana:
name: Create Asana Task
needs: [swiftlint, tests, release-build, verify-autoconsent-bundle, private-api]

if: failure() && github.ref_name == 'develop'

env:
WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}

runs-on: ubuntu-latest

steps:
- name: Create Asana Task
uses: malmstein/github-asana-action@master
with:
asana-pat: ${{ secrets.ASANA_ACCESS_TOKEN }}
asana-project: ${{ vars.MACOS_APP_DEVELOPMENT_ASANA_PROJECT_ID }}
asana-task-name: 'PR Check is failing on develop'
action: create-asana-task
asana-task-description: PR Checks conducted after merging have failed. See ${{ env.WORKFLOW_URL }}
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ jobs:
ASANA_ACCESS_TOKEN: ${{ secrets.ASANA_ACCESS_TOKEN }}
MM_HANDLES_BASE64: ${{ secrets.MM_HANDLES_BASE64 }}
MM_WEBHOOK_URL: ${{ secrets.MM_WEBHOOK_URL }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

appstore-release:
name: Prepare AppStore Release
Expand Down
2 changes: 1 addition & 1 deletion Configuration/AppStoreBuildNumber.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
CURRENT_PROJECT_VERSION = 47
CURRENT_PROJECT_VERSION = 48
2 changes: 1 addition & 1 deletion Configuration/Version.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1 @@
MARKETING_VERSION = 1.51.0
MARKETING_VERSION = 1.51.1
16 changes: 14 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,8 @@
37197EAC294244D600394917 /* FutureExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = B634DBE6293C98C500C3C99E /* FutureExtension.swift */; };
371C0A2927E33EDC0070591F /* FeedbackPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 371C0A2827E33EDC0070591F /* FeedbackPresenter.swift */; };
371D00E129D8509400EC8598 /* OpenSSL in Frameworks */ = {isa = PBXBuildFile; productRef = 371D00E029D8509400EC8598 /* OpenSSL */; };
372BC2A12A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372BC2A02A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift */; };
372BC2A22A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 372BC2A02A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift */; };
3739326529AE4B39009346AE /* DDGSync in Frameworks */ = {isa = PBXBuildFile; productRef = 3739326429AE4B39009346AE /* DDGSync */; };
3739326729AE4B42009346AE /* DDGSync in Frameworks */ = {isa = PBXBuildFile; productRef = 3739326629AE4B42009346AE /* DDGSync */; };
373A1AA8283ED1B900586521 /* BookmarkHTMLReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373A1AA7283ED1B900586521 /* BookmarkHTMLReader.swift */; };
Expand Down Expand Up @@ -989,6 +991,8 @@
37CD54CE27F2FDD100F1F7B9 /* PreferencesSidebarModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CD54C627F2FDD100F1F7B9 /* PreferencesSidebarModel.swift */; };
37CD54CF27F2FDD100F1F7B9 /* AppearancePreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CD54C727F2FDD100F1F7B9 /* AppearancePreferences.swift */; };
37CD54D027F2FDD100F1F7B9 /* DefaultBrowserPreferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CD54C827F2FDD100F1F7B9 /* DefaultBrowserPreferences.swift */; };
37CEFCA92A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CEFCA82A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift */; };
37CEFCAA2A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37CEFCA82A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift */; };
37D2377A287EB8CA00BCE03B /* TabIndex.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D23779287EB8CA00BCE03B /* TabIndex.swift */; };
37D2377C287EBDA300BCE03B /* TabIndexTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D2377B287EBDA300BCE03B /* TabIndexTests.swift */; };
37D23780287EFEE200BCE03B /* PinnedTabsManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37D2377F287EFEE200BCE03B /* PinnedTabsManagerTests.swift */; };
Expand Down Expand Up @@ -2223,6 +2227,7 @@
3714B1E628EDB7FA0056C57A /* DuckPlayerPreferencesTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DuckPlayerPreferencesTests.swift; sourceTree = "<group>"; };
3714B1E828EDBAAB0056C57A /* DuckPlayerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DuckPlayerTests.swift; sourceTree = "<group>"; };
371C0A2827E33EDC0070591F /* FeedbackPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeedbackPresenter.swift; sourceTree = "<group>"; };
372BC2A02A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncCredentialsAdapter.swift; sourceTree = "<group>"; };
373A1AA7283ED1B900586521 /* BookmarkHTMLReader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkHTMLReader.swift; sourceTree = "<group>"; };
373A1AA9283ED86C00586521 /* BookmarksHTMLReaderTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarksHTMLReaderTests.swift; sourceTree = "<group>"; };
373A1AAF2842C4EA00586521 /* BookmarkHTMLImporter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BookmarkHTMLImporter.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2296,6 +2301,7 @@
37CD54C627F2FDD100F1F7B9 /* PreferencesSidebarModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreferencesSidebarModel.swift; sourceTree = "<group>"; };
37CD54C727F2FDD100F1F7B9 /* AppearancePreferences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppearancePreferences.swift; sourceTree = "<group>"; };
37CD54C827F2FDD100F1F7B9 /* DefaultBrowserPreferences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = DefaultBrowserPreferences.swift; sourceTree = "<group>"; };
37CEFCA82A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CredentialsCleanupErrorHandling.swift; sourceTree = "<group>"; };
37D23779287EB8CA00BCE03B /* TabIndex.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabIndex.swift; sourceTree = "<group>"; };
37D2377B287EBDA300BCE03B /* TabIndexTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabIndexTests.swift; sourceTree = "<group>"; };
37D2377F287EFEE200BCE03B /* PinnedTabsManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PinnedTabsManagerTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3610,7 +3616,9 @@
373D9B4729EEAC1B00381FDD /* SyncMetadataDatabase.swift */,
37445F982A1566420029F789 /* SyncDataProviders.swift */,
37445F9B2A1569F00029F789 /* SyncBookmarksAdapter.swift */,
372BC2A02A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift */,
37FD78102A29EBD100B36DB1 /* SyncErrorHandler.swift */,
37CEFCA82A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift */,
);
path = Sync;
sourceTree = "<group>";
Expand Down Expand Up @@ -6907,13 +6915,13 @@
isa = PBXNativeTarget;
buildConfigurationList = AA585DA4248FD31500E9A3E2 /* Build configuration list for PBXNativeTarget "DuckDuckGo Privacy Browser" */;
buildPhases = (
B6F2C8722A7A4C7D000498CF /* Make /Applications symlink, remove app on Clean build */,
CBCCF59E299667B700C02DFE /* Assert Xcode version */,
3705272528992C8A000C06A2 /* Check Embedded Config URLs */,
AA585D7A248FD31100E9A3E2 /* Sources */,
AA8EDF2824925E940071C2E8 /* Swift Lint */,
AA585D7B248FD31100E9A3E2 /* Frameworks */,
AA585D7C248FD31100E9A3E2 /* Resources */,
B6F2C8722A7A4C7D000498CF /* Make /Applications symlink, remove app on Clean build */,
4B2D065D2A11D2AE00DE1F49 /* Embed Login Items */,
4B5F14F32A14823D0060320F /* Embed NetP Controller Apps */,
4B5F14F62A14825A0060320F /* Replace VPN Controllers with Symlinks */,
Expand Down Expand Up @@ -7827,6 +7835,7 @@
3706FB64293F65D500E42796 /* PixelDataModel.xcdatamodeld in Sources */,
B626A75B29921FAA00053070 /* NavigationActionPolicyExtension.swift in Sources */,
3706FB65293F65D500E42796 /* PrivacyDashboardWebView.swift in Sources */,
372BC2A22A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift in Sources */,
3706FB66293F65D500E42796 /* AppearancePreferences.swift in Sources */,
3706FB67293F65D500E42796 /* DownloadListCoordinator.swift in Sources */,
3706FB68293F65D500E42796 /* NSNotificationName+Debug.swift in Sources */,
Expand Down Expand Up @@ -7973,6 +7982,7 @@
3706FBDB293F65D500E42796 /* DefaultBrowserPreferences.swift in Sources */,
3706FBDC293F65D500E42796 /* Permissions.xcdatamodeld in Sources */,
3706FBDD293F65D500E42796 /* PaddedImageButton.swift in Sources */,
37CEFCAA2A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift in Sources */,
3706FBDE293F65D500E42796 /* EncryptionKeyStoring.swift in Sources */,
4B4D60E32A0C883A00BCD287 /* Main.swift in Sources */,
37197EA12942441700394917 /* Tab+UIDelegate.swift in Sources */,
Expand Down Expand Up @@ -8757,6 +8767,7 @@
37AFCE9227DB8CAD00471A10 /* PreferencesAboutView.swift in Sources */,
9826B0A02747DF3D0092F683 /* ContentBlocking.swift in Sources */,
4B379C2227BDBA29008A968E /* LocalAuthenticationService.swift in Sources */,
37CEFCA92A6737A2001EF741 /* CredentialsCleanupErrorHandling.swift in Sources */,
4BB99D0326FE191E001E4761 /* SafariBookmarksReader.swift in Sources */,
1DA6D0FD2A1FF9A100540406 /* HTTPCookie.swift in Sources */,
AACF6FD626BC366D00CF09F9 /* SafariVersionReader.swift in Sources */,
Expand Down Expand Up @@ -9050,6 +9061,7 @@
85CC1D7B26A05ECF0062F04E /* PasswordManagementItemListModel.swift in Sources */,
AABEE6A924AB4B910043105B /* SuggestionTableCellView.swift in Sources */,
AA6820F125503DA9005ED0D5 /* FireViewModel.swift in Sources */,
372BC2A12A4AFA47001D8FD5 /* SyncCredentialsAdapter.swift in Sources */,
AAA0CC6A253CC43C0079BC96 /* WKUserContentControllerExtension.swift in Sources */,
4BE65479271FCD41008D1D63 /* EditableTextView.swift in Sources */,
AA9FF95D24A1FA1C0039E328 /* TabCollection.swift in Sources */,
Expand Down Expand Up @@ -10319,7 +10331,7 @@
repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 72.1.0;
version = 74.0.1;
};
};
AA06B6B52672AF8100F541C5 /* XCRemoteSwiftPackageReference "Sparkle" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/BrowserServicesKit",
"state" : {
"revision" : "dee5c815afe37bd82c48408c41646ad5af5b24e7",
"version" : "72.1.0"
"revision" : "da6b1eac1d4b4416eb82fb5648519aa5cb363a17",
"version" : "74.0.1"
}
},
{
Expand All @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/duckduckgo-autofill.git",
"state" : {
"revision" : "b1160df954eea20cd4cdf9356afc369751981b16",
"version" : "8.0.0"
"revision" : "40bcd0d347b51d14e8114f191df2817d8dcb4284",
"version" : "8.1.2"
}
},
{
Expand Down Expand Up @@ -129,7 +129,7 @@
{
"identity" : "trackerradarkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/TrackerRadarKit.git",
"location" : "https://github.com/duckduckgo/TrackerRadarKit",
"state" : {
"revision" : "4684440d03304e7638a2c8086895367e90987463",
"version" : "1.2.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@
<Test
Identifier = "StatisticsLoaderTests/testWhenRefreshRetentionAtbIsPerformedForNavigationThenAppRetentionAtbRequested()">
</Test>
<Test
Identifier = "WindowManagerStateRestorationTests/testWindowManagerStateRestoration()">
</Test>
</SkippedTests>
</TestableReference>
<TestableReference
Expand Down
9 changes: 9 additions & 0 deletions DuckDuckGo/AppDelegate/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ final class AppDelegate: NSObject, NSApplicationDelegate, FileDownloadManagerDel
.removeDuplicates()
.sink { isSyncDisabled in
LocalBookmarkManager.shared.updateBookmarkDatabaseCleanupSchedule(shouldEnable: isSyncDisabled)
syncDataProviders.credentialsAdapter.updateDatabaseCleanupSchedule(shouldEnable: isSyncDisabled)
}

// This is also called in applicationDidBecomeActive, but we're also calling it here, since
Expand All @@ -308,6 +309,14 @@ final class AppDelegate: NSObject, NSApplicationDelegate, FileDownloadManagerDel

self.syncDataProviders = syncDataProviders
self.syncService = syncService

bookmarksManager.bookmarkDatabaseCleaner.isSyncActive = { [weak self] in
self?.syncService?.authState == .active
}

syncDataProviders.credentialsAdapter.databaseCleaner.isSyncActive = { [weak self] in
self?.syncService?.authState == .active
}
}

// MARK: - Network Protection
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/Autoconsent/autoconsent-bundle.js

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions DuckDuckGo/Autofill/ContentOverlayViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public final class ContentOverlayViewController: NSViewController, EmailManagerR
return model
}()

lazy var passwordManagerCoordinator: PasswordManagerCoordinating = PasswordManagerCoordinator.shared

public override func viewDidLoad() {
initWebView()
addTrackingArea()
Expand Down Expand Up @@ -250,6 +252,11 @@ extension ContentOverlayViewController: SecureVaultManagerDelegate {

public func secureVaultManager(_: SecureVaultManager, didAutofill type: AutofillType, withObjectId objectId: String) {
Pixel.fire(.formAutofilled(kind: type.formAutofillKind))

if type.formAutofillKind == .password &&
passwordManagerCoordinator.isEnabled {
passwordManagerCoordinator.reportPasswordAutofill()
}
}

public func secureVaultManager(_: SecureVaultManager, didRequestAuthenticationWithCompletionHandler handler: @escaping (Bool) -> Void) {
Expand Down
11 changes: 6 additions & 5 deletions DuckDuckGo/Bookmarks/Model/BookmarkManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,17 @@ final class LocalBookmarkManager: BookmarkManager {
self.faviconManagement = faviconManagement
}

let bookmarkDatabaseCleaner = BookmarkDatabaseCleaner(
bookmarkDatabase: BookmarkDatabase.shared.db,
errorEvents: BookmarksCleanupErrorHandling(),
log: .bookmarks
)

@Published private(set) var list: BookmarkList?
var listPublisher: Published<BookmarkList?>.Publisher { $list }

private lazy var bookmarkStore: BookmarkStore = LocalBookmarkStore(bookmarkDatabase: BookmarkDatabase.shared)
private lazy var faviconManagement: FaviconManagement = FaviconManager.shared
private lazy var bookmarkDatabaseCleaner = BookmarkDatabaseCleaner(
bookmarkDatabase: BookmarkDatabase.shared.db,
errorEvents: BookmarksCleanupErrorHandling(),
log: .bookmarks
)

// MARK: - Bookmarks

Expand Down
10 changes: 7 additions & 3 deletions DuckDuckGo/Bookmarks/Model/BookmarksCleanupErrorHandling.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ public class BookmarksCleanupErrorHandling: EventMapping<BookmarksCleanupError>

public init() {
super.init { event, _, _, _ in
let processedErrors = CoreDataErrorsParser.parse(error: event.coreDataError as NSError)
let params = processedErrors.errorPixelParameters
if event.cleanupError is BookmarksCleanupCancelledError {
Pixel.fire(.debug(event: .bookmarksCleanupAttemptedWhileSyncWasEnabled))
} else {
let processedErrors = CoreDataErrorsParser.parse(error: event.cleanupError as NSError)
let params = processedErrors.errorPixelParameters

Pixel.fire(.debug(event: .bookmarksCleanupFailed, error: event.coreDataError), withAdditionalParameters: params)
Pixel.fire(.debug(event: .bookmarksCleanupFailed, error: event.cleanupError), withAdditionalParameters: params)
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGo/Bookmarks/Services/LocalBookmarkStore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ final class LocalBookmarkStore: BookmarkStore {
func remove(objectsWithUUIDs identifiers: [String], completion: @escaping (Bool, Error?) -> Void) {

applyChangesAndSave(changes: { [weak self] context in
guard let self = self else {
guard self != nil else {
throw BookmarkStoreError.storeDeallocated
}

Expand Down Expand Up @@ -488,7 +488,7 @@ final class LocalBookmarkStore: BookmarkStore {

let context = makeContext()
context.performAndWait { [weak self] in
guard let self = self else {
guard self != nil else {
assertionFailure("Couldn't get strong self")
return
}
Expand Down
11 changes: 8 additions & 3 deletions DuckDuckGo/Common/View/SwiftUI/LoginFaviconView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,12 @@ import SwiftUI

struct LoginFaviconView: View {

let domain: String
let domain: String?

let faviconManagement: FaviconManagement = FaviconManager.shared

var body: some View {

let favicon = faviconManagement.getCachedFavicon(for: domain, sizeCategory: .small)?.image ?? NSImage(named: "Login")

if let image = favicon {
Image(nsImage: image)
.resizable()
Expand All @@ -38,4 +36,11 @@ struct LoginFaviconView: View {

}

var favicon: NSImage? {
guard let domain else {
return NSImage(named: "Login")
}
return faviconManagement.getCachedFavicon(for: domain, sizeCategory: .small)?.image ?? NSImage(named: "Login")
}

}
Loading

0 comments on commit 9df76fc

Please sign in to comment.