Skip to content
This repository was archived by the owner on Feb 24, 2025. It is now read-only.

Commit b6838a1

Browse files
authored
Tiny fixes from the feedback form (#164)
* Droping tabs to other apps dismissed * Ghosting effect of the address bar fixed
1 parent 43bb589 commit b6838a1

File tree

2 files changed

+3
-14
lines changed

2 files changed

+3
-14
lines changed

DuckDuckGo/NavigationBar/View/AddressBarViewController.swift

+3-12
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ final class AddressBarViewController: NSViewController {
131131
passiveTextField.stringValue = ""
132132
return
133133
}
134-
passiveAddressBarStringCancellable = selectedTabViewModel.$passiveAddressBarString.sink { [weak self] _ in
135-
self?.updatePassiveTextField()
136-
}
134+
passiveAddressBarStringCancellable = selectedTabViewModel.$passiveAddressBarString
135+
.receive(on: DispatchQueue.main)
136+
.weakAssign(to: \.stringValue, on: passiveTextField)
137137
}
138138

139139
private func subscribeToProgressEvents() {
@@ -183,15 +183,6 @@ final class AddressBarViewController: NSViewController {
183183
}
184184
}
185185

186-
private func updatePassiveTextField() {
187-
guard let selectedTabViewModel = tabCollectionViewModel.selectedTabViewModel else {
188-
os_log("%s: Selected tab view model is nil", type: .error, className)
189-
return
190-
}
191-
192-
passiveTextField.stringValue = selectedTabViewModel.passiveAddressBarString
193-
}
194-
195186
private func updateView(firstResponder: Bool) {
196187
addressBarTextField.alphaValue = firstResponder ? 1 : 0
197188
passiveTextField.alphaValue = firstResponder ? 0 : 1

DuckDuckGo/TabBar/View/TabBarCollectionView.swift

-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@ final class TabBarCollectionView: NSCollectionView {
3333

3434
// Register for the dropped object types we can accept.
3535
registerForDraggedTypes([.URL])
36-
// Enable dragging items from our CollectionView to other applications.
37-
setDraggingSourceOperationMask([.private], forLocal: false)
3836
// Enable dragging items within and into our CollectionView.
3937
setDraggingSourceOperationMask([.private], forLocal: true)
4038
}

0 commit comments

Comments
 (0)