Skip to content

Commit

Permalink
fix warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mallexxx committed Sep 2, 2024
1 parent ef6ccc9 commit 304d6dc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DuckDuckGo/Bookmarks/Services/BookmarksContextMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ extension BookmarksContextMenu {

static func menuItems(for folder: BookmarkFolder, target: AnyObject?, forSearch: Bool, includeManageBookmarksItem: Bool) -> [NSMenuItem] {
// disable "Open All" if no Bookmarks in folder
var hasBookmarks = folder.children.contains(where: { $0 is Bookmark })
let hasBookmarks = folder.children.contains(where: { $0 is Bookmark })
var items = [
openInNewTabsMenuItem(folder: folder, target: target, enabled: hasBookmarks),
openAllInNewWindowMenuItem(folder: folder, target: target, enabled: hasBookmarks),
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/Tab/TabExtensions/DuckPlayerTabExtension.swift
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ extension DuckPlayerTabExtension: NavigationResponder {
return
}
if navigation.url.isDuckPlayer {
var setting = preferences.duckPlayerMode == .enabled ? "always" : "default"
let setting = preferences.duckPlayerMode == .enabled ? "always" : "default"
let newTabSettings = preferences.duckPlayerOpenInNewTab ? "true" : "false"
let autoplay = preferences.duckPlayerAutoplay ? "true" : "false"

Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/Tab/View/BrowserTabViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ final class BrowserTabViewController: NSViewController {
private func subscribeToDuckPlayerOnboardingPrompt(of tabViewModel: TabViewModel?) {
tabViewModel?.tab.duckPlayerOnboardingPublisher.sink { [weak self, weak tab = tabViewModel?.tab] onboardingState in

guard let self, let tab, let onboardingState = onboardingState, onboardingState.onboardingDecider.canDisplayOnboarding else {
guard let self, tab != nil, let onboardingState = onboardingState, onboardingState.onboardingDecider.canDisplayOnboarding else {
self?.duckPlayerOnboardingModalManager.close(animated: false, completion: nil)
return
}
Expand Down

0 comments on commit 304d6dc

Please sign in to comment.