Skip to content

Commit 61a244c

Browse files
author
golson
committed
Undo unnecessary changes
1 parent 3cb32af commit 61a244c

File tree

2 files changed

+1
-18
lines changed

2 files changed

+1
-18
lines changed

WMFComponents/Sources/WMFComponents/Extensions/Navigation Bar/WMFNavigationBarHiding.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,6 @@ public extension WMFNavigationBarHiding where Self:UIViewController {
5959
}
6060
}
6161

62-
/// Call from a UIViewController's scrollViewDidScroll method to swap the logo image on scroll
63-
/// - Parameter scrollView: The scroll view to track scroll position
6462
func updateLogoImageOnScroll(scrollView: UIScrollView) {
6563
let finalOffset = scrollView.contentOffset.y + scrollView.safeAreaInsets.top
6664
let isCompactMode = finalOffset > 75

Wikipedia/Code/SearchLanguagesBarViewController.swift

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,6 @@ class SearchLanguageButton: UnderlineButton {
2323

2424
// MARK: - UI Elements
2525

26-
private lazy var backgroundView: UIView = {
27-
let view = UIView()
28-
view.translatesAutoresizingMaskIntoConstraints = false
29-
view.isUserInteractionEnabled = false
30-
view.layer.cornerRadius = 8
31-
view.layer.masksToBounds = true
32-
return view
33-
}()
34-
3526
private lazy var languageCodeContainer: UIView = {
3627
let view = UIView()
3728
view.translatesAutoresizingMaskIntoConstraints = false
@@ -75,7 +66,6 @@ class SearchLanguageButton: UnderlineButton {
7566
titleLabel.numberOfLines = 1
7667
titleLabel.adjustsFontForContentSizeCategory = true
7768

78-
insertSubview(backgroundView, belowSubview: titleLabel)
7969
addSubview(languageCodeContainer)
8070
languageCodeContainer.addSubview(languageCodeLabel)
8171

@@ -90,11 +80,7 @@ class SearchLanguageButton: UnderlineButton {
9080
languageCodeLabel.centerYAnchor.constraint(equalTo: languageCodeContainer.centerYAnchor),
9181
languageCodeLabel.centerXAnchor.constraint(equalTo: languageCodeContainer.centerXAnchor),
9282
languageCodeLabel.leadingAnchor.constraint(equalTo: languageCodeContainer.leadingAnchor, constant: 2),
93-
languageCodeLabel.trailingAnchor.constraint(equalTo: languageCodeContainer.trailingAnchor, constant: -2),
94-
backgroundView.leadingAnchor.constraint(equalTo: leadingAnchor),
95-
backgroundView.trailingAnchor.constraint(equalTo: trailingAnchor),
96-
backgroundView.topAnchor.constraint(equalTo: topAnchor),
97-
backgroundView.bottomAnchor.constraint(equalTo: bottomAnchor)
83+
languageCodeLabel.trailingAnchor.constraint(equalTo: languageCodeContainer.trailingAnchor, constant: -2)
9884
])
9985

10086
let isRTL = effectiveUserInterfaceLayoutDirection == .rightToLeft
@@ -117,7 +103,6 @@ class SearchLanguageButton: UnderlineButton {
117103
tintColor = isSelected ? theme.colors.link : theme.colors.tertiaryText
118104
languageCodeContainer.backgroundColor = isSelected ? theme.colors.link : theme.colors.tertiaryText
119105
languageCodeLabel.textColor = theme.colors.paperBackground
120-
backgroundView.backgroundColor = theme.colors.paperBackground
121106
}
122107

123108
}

0 commit comments

Comments
 (0)