Skip to content

Commit 28617a4

Browse files
authored
Merge branch 'liquid-glass' into T416194
2 parents 36d5168 + 02139b1 commit 28617a4

File tree

101 files changed

+142
-675
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+142
-675
lines changed

WMF Framework/WMFContentGroup+Display.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ extension WMFContentGroup {
135135
return false
136136
}
137137
switch contentGroupKind {
138-
case .announcement, .notification, .theme, .readingList:
138+
case .announcement, .theme, .readingList:
139139
return false
140140
default:
141141
return true

WMF Framework/WMFContentGroup+Extensions.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ typedef NS_ENUM(int32_t, WMFContentGroupKind) {
3030
WMFContentGroupKindFeaturedArticle = 7,
3131
WMFContentGroupKindTopRead = 8,
3232
WMFContentGroupKindNews = 9,
33-
WMFContentGroupKindNotification = 10,
3433
WMFContentGroupKindAnnouncement = 11,
3534
WMFContentGroupKindLocationPlaceholder = 12,
3635
WMFContentGroupKindOnThisDay = 13,

WMF Framework/WMFContentGroup+Extensions.m

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@ - (void)updateKey {
7373
case WMFContentGroupKindOnThisDay:
7474
URL = [WMFContentGroup onThisDayContentGroupURLForSiteURL:self.siteURL midnightUTCDate:self.midnightUTCDate];
7575
break;
76-
case WMFContentGroupKindNotification:
77-
URL = [WMFContentGroup notificationContentGroupURLWithLanguageVariantCode:self.siteURL.wmf_languageVariantCode];
78-
break;
7976
case WMFContentGroupKindTheme:
8077
URL = [WMFContentGroup themeContentGroupURLWithLanguageVariantCode:self.siteURL.wmf_languageVariantCode];
8178
break;
@@ -114,9 +111,6 @@ - (void)updateContentType {
114111
case WMFContentGroupKindAnnouncement:
115112
self.contentType = WMFContentTypeAnnouncement;
116113
break;
117-
case WMFContentGroupKindNotification:
118-
self.contentType = WMFContentTypeNotification;
119-
break;
120114
case WMFContentGroupKindTheme:
121115
self.contentType = WMFContentTypeTheme;
122116
break;
@@ -181,9 +175,6 @@ - (void)updateDailySortPriorityWithSortOrderByContentLanguageCode:(nullable NSDi
181175
case WMFContentGroupKindNews:
182176
updatedDailySortPriority = contentLanguageSortOrder + 6;
183177
break;
184-
case WMFContentGroupKindNotification:
185-
updatedDailySortPriority = -1;
186-
break;
187178
case WMFContentGroupKindPictureOfTheDay:
188179
updatedDailySortPriority = 8;
189180
break;
@@ -345,7 +336,6 @@ - (void)updateContentPreviewWithContent:(id)content {
345336

346337
} break;
347338
case WMFContentGroupKindMainPage:
348-
case WMFContentGroupKindNotification:
349339
case WMFContentGroupKindLocationPlaceholder:
350340
case WMFContentGroupKindPictureOfTheDay:
351341
case WMFContentGroupKindRandom:

WMF Framework/WMFExploreFeedContentController.m

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ - (BOOL)anyContentGroupsVisibleInTheFeedForSiteURL:(NSURL *)siteURL {
415415
static NSSet *customizableContentGroupKindNumbers;
416416
static dispatch_once_t onceToken;
417417
dispatch_once(&onceToken, ^{
418-
customizableContentGroupKindNumbers = [NSSet setWithArray:@[@(WMFContentGroupKindFeaturedArticle), @(WMFContentGroupKindNews), @(WMFContentGroupKindTopRead), @(WMFContentGroupKindOnThisDay), @(WMFContentGroupKindLocation), @(WMFContentGroupKindLocationPlaceholder), @(WMFContentGroupKindRandom), @(WMFContentGroupKindNotification)]];
418+
customizableContentGroupKindNumbers = [NSSet setWithArray:@[@(WMFContentGroupKindFeaturedArticle), @(WMFContentGroupKindNews), @(WMFContentGroupKindTopRead), @(WMFContentGroupKindOnThisDay), @(WMFContentGroupKindLocation), @(WMFContentGroupKindLocationPlaceholder), @(WMFContentGroupKindRandom)]];
419419
});
420420
return customizableContentGroupKindNumbers;
421421
}
@@ -719,11 +719,6 @@ - (void)applyExploreFeedPreferencesToObjects:(NSArray<WMFContentGroup *>*)object
719719
continue;
720720
}
721721

722-
// Do not let preferences affect the notifications card
723-
if (contentGroup.contentGroupKind == WMFContentGroupKindNotification) {
724-
continue;
725-
}
726-
727722
BOOL isVisible;
728723
if ([self isGlobal:contentGroup.contentGroupKind]) {
729724
NSDictionary *globalCardPreferences = [exploreFeedPreferences objectForKey:WMFExploreFeedPreferencesGlobalCardsKey];

WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ struct SettingsRow: View {
4343
case .toggle(let binding):
4444
Toggle("", isOn: binding)
4545
.labelsHidden()
46+
.toggleStyle(SwitchToggleStyle(tint: Color(uiColor: theme.accent)))
4647
case .icon(let image):
4748
if let image {
4849
Image(uiImage: image)

WMFComponents/Sources/WMFComponents/Components/Settings/WMFSettingsViewModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ final public class WMFSettingsViewModel: ObservableObject {
227227
self.username = username
228228
self.tempUsername = tempUsername
229229
self.isTempAccount = isTempAccount
230-
await buildSections()
230+
await refreshSections()
231231
}
232232

233233
/// Updates the language, explore feed status and reading theme synchronously

WMFComponents/Sources/WMFComponents/Components/Shared/Buttons/CloseButtons.swift

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,16 +60,14 @@ import SwiftUI
6060

6161
switch config.imageType {
6262
case .plainX:
63-
let image = WMFSFSymbolIcon.for(symbol: .close, font: WMFFont.navigationBarCloseButtonFont)
64-
item = UIBarButtonItem(image: image, style: .plain, target: config.target, action: config.action)
65-
item.tintColor = theme.text
63+
item = UIBarButtonItem(barButtonSystemItem: .cancel, target: config.target, action: config.action)
6664

6765
case .prominentCheck:
6866
let image = WMFSFSymbolIcon.for(symbol: .checkmark, font: WMFFont.navigationBarCloseButtonFont)
6967
if #available(iOS 26.0, *) {
7068
item = UIBarButtonItem(image: image, style: .prominent, target: config.target, action: config.action)
7169
} else {
72-
item = UIBarButtonItem(image: image, style: .done, target: config.target, action: config.action)
70+
item = UIBarButtonItem(barButtonSystemItem: .done, target: config.target, action: config.action)
7371
}
7472
item.tintColor = theme.link
7573
}

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,7 @@ public extension WMFNavigationBarConfiguring where Self: UIViewController {
141141
navigationController?.navigationBar.prefersLargeTitles = false
142142
navigationItem.largeTitleDisplayMode = .never
143143

144-
// will see double-titles on iPhones without this
145-
if traitCollection.horizontalSizeClass == .compact {
146-
navigationItem.titleView = UIView()
147-
}
144+
navigationItem.titleView = UIView()
148145

149146
if let customTitleView = titleConfig.customView {
150147
let button = UIBarButtonItem(customView: customTitleView)

WMFData/Sources/WMFData/Data Controllers/Settings/WMFSettingsDataController.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ public actor WMFSettingsDataController: ObservableObject {
8080
try? userDefaultsStore?.save(key: WMFUserDefaultsKey.autoSignTalkPageDiscussions.rawValue, value: newValue)
8181
}
8282

83+
public nonisolated func didMigrateAutoSignTalkPageDiscussions() -> Bool {
84+
return (try? userDefaultsStore?.load(key: WMFUserDefaultsKey.didMigrateAutoSignTalkPageDiscussions.rawValue)) ?? false
85+
}
86+
87+
public nonisolated func setDidMigrateAutoSignTalkPageDiscussions(_ newValue: Bool) {
88+
try? userDefaultsStore?.save(key: WMFUserDefaultsKey.didMigrateAutoSignTalkPageDiscussions.rawValue, value: newValue)
89+
}
90+
91+
public nonisolated func hasStoredAutoSignTalkPageDiscussions() -> Bool {
92+
return UserDefaults.standard.object(forKey: WMFUserDefaultsKey.autoSignTalkPageDiscussions.rawValue) != nil
93+
}
94+
8395
// MARK: - Search Settings
8496

8597
public nonisolated func showSearchLanguageBar() -> Bool {

WMFData/Sources/WMFData/Store/WMFUserDefaultsKey.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public enum WMFUserDefaultsKey: String {
3535
case activityTabIsEditingInsightsOn = "activity-tab-editing-insights"
3636
case activityTabIsTimelineOfBehaviorOn = "activity-tab-timeline-of-behavior"
3737
case autoSignTalkPageDiscussions = "auto-sign-talk-page-discussions"
38+
case didMigrateAutoSignTalkPageDiscussions = "did-migrate-auto-sign-talk-page-discussions"
3839
case showSearchLanguageBar = "show-search-language-bar"
3940
case openAppOnSearchTab = "open-app-on-search-tab"
4041
case isSubscribedToEchoNotifications = "is-subscribed-to-echo-notifications"

0 commit comments

Comments
 (0)