Skip to content

Commit

Permalink
Merge branch 'release/7.116.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
dus7 committed Apr 17, 2024
2 parents b86bcd3 + dd16758 commit 79d3cf1
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 59 deletions.
56 changes: 28 additions & 28 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -8411,7 +8411,7 @@
CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = HKE973VLUW;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
Expand Down Expand Up @@ -8448,7 +8448,7 @@
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -8540,7 +8540,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = ShareExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand Down Expand Up @@ -8568,7 +8568,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -8718,7 +8718,7 @@
CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
Expand All @@ -8744,7 +8744,7 @@
CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
INFOPLIST_FILE = DuckDuckGo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand Down Expand Up @@ -8810,7 +8810,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = Widgets/Info.plist;
Expand Down Expand Up @@ -8845,7 +8845,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
Expand Down Expand Up @@ -8879,7 +8879,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = OpenAction/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand Down Expand Up @@ -8910,7 +8910,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -9197,7 +9197,7 @@
CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAlpha.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
Expand Down Expand Up @@ -9229,7 +9229,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = ShareExtension/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand Down Expand Up @@ -9258,7 +9258,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = OpenAction/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand Down Expand Up @@ -9292,7 +9292,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
GCC_C_LANGUAGE_STANDARD = gnu11;
INFOPLIST_FILE = Widgets/Info.plist;
Expand Down Expand Up @@ -9323,7 +9323,7 @@
CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProviderAlpha.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = HKE973VLUW;
GCC_C_LANGUAGE_STANDARD = gnu11;
GENERATE_INFOPLIST_FILE = YES;
Expand Down Expand Up @@ -9356,11 +9356,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 0;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Core/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -9594,7 +9594,7 @@
CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAlpha.entitlements;
CODE_SIGN_IDENTITY = "iPhone Distribution";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_ASSET_PATHS = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
Expand Down Expand Up @@ -9622,7 +9622,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -9655,7 +9655,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -9693,7 +9693,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
Expand Down Expand Up @@ -9729,7 +9729,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand Down Expand Up @@ -9764,11 +9764,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 0;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Core/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -9942,11 +9942,11 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 0;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Core/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down Expand Up @@ -9975,10 +9975,10 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 0;
CURRENT_PROJECT_VERSION = 1;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 0;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = Core/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
Expand Down
2 changes: 1 addition & 1 deletion DuckDuckGo/MainViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2318,7 +2318,7 @@ extension MainViewController: TabSwitcherButtonDelegate {
}

func showTabSwitcher() {
guard let currentTab = currentTab ?? tabManager.current(createIfNeeded: true) else {
guard currentTab ?? tabManager.current(createIfNeeded: true) != nil else {
fatalError("Unable to get current tab")
}

Expand Down
40 changes: 14 additions & 26 deletions DuckDuckGo/SettingsHostingController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import Subscription
class SettingsHostingController: UIHostingController<AnyView> {
var viewModel: SettingsViewModel
var viewProvider: SettingsLegacyViewProvider

init(viewModel: SettingsViewModel, viewProvider: SettingsLegacyViewProvider) {
self.viewModel = viewModel
self.viewProvider = viewProvider
Expand All @@ -34,15 +34,15 @@ class SettingsHostingController: UIHostingController<AnyView> {
viewModel.onRequestPushLegacyView = { [weak self] vc in
self?.pushLegacyViewController(vc)
}

viewModel.onRequestPresentLegacyView = { [weak self] vc, modal in
self?.presentLegacyViewController(vc, modal: modal)
}

viewModel.onRequestPopLegacyView = { [weak self] in
self?.navigationController?.popViewController(animated: true)
}

viewModel.onRequestDismissSettings = { [weak self] in
self?.navigationController?.dismiss(animated: true)
}
Expand All @@ -54,7 +54,15 @@ class SettingsHostingController: UIHostingController<AnyView> {
}
self.rootView = AnyView(settingsView)

decorate()
decorateNavigationBar()
}

override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)

// If this is not called, settings navigation bar (UIKIt) is going wild with colors after reopening settings (?!)
// Root cause will be investigated later as part of https://app.asana.com/0/414235014887631/1207098219526666/f
decorateNavigationBar()
}

required init?(coder aDecoder: NSCoder) {
Expand All @@ -64,31 +72,11 @@ class SettingsHostingController: UIHostingController<AnyView> {
func pushLegacyViewController(_ vc: UIViewController) {
navigationController?.pushViewController(vc, animated: true)
}

func presentLegacyViewController(_ vc: UIViewController, modal: Bool = false) {
if modal {
vc.modalPresentationStyle = .fullScreen
}
navigationController?.present(vc, animated: true)
}
}

extension SettingsHostingController {

private func decorate() {
let theme = ThemeManager.shared.currentTheme
// Apply Theme
navigationController?.navigationBar.barTintColor = theme.barBackgroundColor
navigationController?.navigationBar.tintColor = theme.navigationBarTintColor

if #available(iOS 15.0, *) {
let appearance = UINavigationBarAppearance()
appearance.shadowColor = .clear
appearance.backgroundColor = theme.backgroundColor

navigationController?.navigationBar.standardAppearance = appearance
navigationController?.navigationBar.scrollEdgeAppearance = appearance
}
}

}
1 change: 1 addition & 0 deletions DuckDuckGo/TabSwitcherViewController+KeyCommands.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ extension TabSwitcherViewController {
}

@objc func keyboardNewTab() {
guard !isProcessingUpdates else { return }
delegate?.tabSwitcherDidRequestNewTab(tabSwitcher: self)
dismiss()
}
Expand Down
4 changes: 3 additions & 1 deletion DuckDuckGo/TabSwitcherViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class TabSwitcherViewController: UIViewController {
var currentSelection: Int?

private var tabSwitcherSettings: TabSwitcherSettings = DefaultTabSwitcherSettings()
private var isProcessingUpdates = false
private(set) var isProcessingUpdates = false
private var canUpdateCollection = true

let favicons = Favicons.shared
Expand Down Expand Up @@ -278,6 +278,8 @@ class TabSwitcherViewController: UIViewController {
}

@IBAction func onAddPressed(_ sender: UIBarButtonItem) {
guard !isProcessingUpdates else { return }

Pixel.fire(pixel: .tabSwitcherNewTab)
delegate.tabSwitcherDidRequestNewTab(tabSwitcher: self)
dismiss()
Expand Down
6 changes: 3 additions & 3 deletions DuckDuckGo/TabViewCell.swift
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,13 @@ class TabViewCell: UICollectionViewCell {
}

private func startRemoveAnimation() {
self.isDeleting = true
Pixel.fire(pixel: .tabSwitcherSwipeCloseTab)
self.deleteTab()
UIView.animate(withDuration: 0.2, animations: {
self.transform = CGAffineTransform.identity.translatedBy(x: -self.frame.width, y: 0)
}, completion: { _ in
self.isHidden = true
self.isDeleting = true
Pixel.fire(pixel: .tabSwitcherSwipeCloseTab)
self.closeTab()
})
}

Expand Down

0 comments on commit 79d3cf1

Please sign in to comment.