Skip to content

Commit f8a9245

Browse files
authored
Merge branch 'trunk' into iangmaia/add-release-version-validation
2 parents 7b2aba1 + bc6887f commit f8a9245

File tree

83 files changed

+3502
-760
lines changed

Some content is hidden

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

83 files changed

+3502
-760
lines changed

Modules/Package.resolved

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Modules/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ let package = Package(
5353
.package(url: "https://github.com/zendesk/support_sdk_ios", from: "8.0.3"),
5454
// We can't use wordpress-rs branches nor commits here. Only tags work.
5555
.package(url: "https://github.com/Automattic/wordpress-rs", revision: "alpha-20250926"),
56-
.package(url: "https://github.com/wordpress-mobile/GutenbergKit", from: "0.8.1-alpha.2"),
56+
.package(url: "https://github.com/wordpress-mobile/GutenbergKit", from: "0.9.0"),
5757
.package(
5858
url: "https://github.com/Automattic/color-studio",
5959
revision: "bf141adc75e2769eb469a3e095bdc93dc30be8de"

Tests/KeystoneTests/Tests/Features/Notifications/NotificationsViewControllerTests.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import XCTest
22
import WordPressData
3-
import UserNotifications
43
@testable import WordPress
54

65
final class NotificationsViewControllerTests: XCTestCase {
@@ -47,7 +46,7 @@ final class NotificationsViewControllerTests: XCTestCase {
4746
func testResetApplicationBadgeWhenAccountChange() throws {
4847
// Give
4948
let newUnreadCount = 1
50-
UNUserNotificationCenter.current().setBadgeCount(0)
49+
UIApplication.shared.applicationIconBadgeNumber = 0
5150
ZendeskUtils.unreadNotificationsCount = newUnreadCount
5251

5352
// When

WordPress/Classes/Stores/RemoteFeatureFlagStore.swift

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ class RemoteFeatureFlagStore {
2727
return deviceID
2828
}
2929

30+
/// Returns `true` if the store hasn't been updated yet. It uses the
31+
/// presence of `deviceID` as an indicator of the previous install.
32+
public var isFreshInstall: Bool {
33+
persistenceStore.string(forKey: Constants.DeviceIdKey) == nil
34+
}
35+
3036
init(persistenceStore: UserPersistentRepository = UserDefaults.standard) {
3137
self.persistenceStore = persistenceStore
3238
}

WordPress/Classes/System/Root View/WordPressAuthenticatorProtocol.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ extension WordPressAuthenticator: WordPressAuthenticatorProtocol {
2828
return false
2929
}
3030

31-
return RemoteFeatureFlag.dotComWebLogin.enabled()
31+
return true
3232
}
3333

3434
private static func continueWithDotCom(_ viewController: UIViewController) -> Bool {

WordPress/Classes/System/WordPressAppDelegate.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,11 @@ extension WordPressAppDelegate {
533533
FeatureFlagOverrideStore().override(RemoteFeatureFlag.dotComWebLogin, withValue: true)
534534
}
535535

536+
/// - warning: must be called before the `update(using:then:)`.
537+
if remoteFeatureFlagStore.isFreshInstall {
538+
FeatureFlagOverrideStore().override(FeatureFlag.newStats, withValue: true)
539+
}
540+
536541
var api: WordPressComRestApi
537542
if let authToken {
538543
api = WordPressComRestApi.defaultV2Api(authToken: authToken)

WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public enum FeatureFlag: Int, CaseIterable {
8484
case .mediaQuotaView:
8585
return false
8686
case .intelligence:
87-
let languageCode = Locale.current.languageCode
87+
let languageCode = Locale.current.language.languageCode?.identifier
8888
return (languageCode ?? "en").hasPrefix("en")
8989
}
9090
}

WordPress/Classes/Utility/Notifications/PushNotificationsManager.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public final class PushNotificationsManager: NSObject {
7575
sharedApplication.registerForRemoteNotifications()
7676
}
7777
sharedApplication.unregisterForRemoteNotifications()
78-
UNUserNotificationCenter.current().setBadgeCount(0)
78+
sharedApplication.applicationIconBadgeNumber = 0
7979
didRegisterForRemoteNotifications = false
8080
}
8181

@@ -187,7 +187,7 @@ public final class PushNotificationsManager: NSObject {
187187

188188
// Badge: Update
189189
if let badgeCountNumber = userInfo.number(forKeyPath: Notification.badgePath)?.intValue {
190-
UNUserNotificationCenter.current().setBadgeCount(badgeCountNumber)
190+
sharedApplication.applicationIconBadgeNumber = badgeCountNumber
191191
}
192192

193193
// Badge: Reset

WordPress/Classes/Utility/ZendeskUtils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ class ZendeskUtils: NSObject, ZendeskUtilsProtocol {
307307
/// - post an NSNotification so the various indicators can be cleared.
308308
///
309309
static func pushNotificationRead() {
310-
UNUserNotificationCenter.current().setBadgeCount(UIApplication.shared.applicationIconBadgeNumber - unreadNotificationsCount)
310+
UIApplication.shared.applicationIconBadgeNumber -= unreadNotificationsCount
311311
unreadNotificationsCount = 0
312312
saveUnreadCount()
313313
postNotificationRead()

WordPress/Classes/ViewRelated/Comments/Controllers/Editor/CommentGutenbergEditorViewController.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,4 +96,12 @@ extension CommentGutenbergEditorViewController: GutenbergKit.EditorViewControlle
9696
func editor(_ viewController: GutenbergKit.EditorViewController, didTriggerAutocompleter type: String) {
9797
// Do nothing
9898
}
99+
100+
func editor(_ viewController: GutenbergKit.EditorViewController, didOpenModalDialog dialogType: String) {
101+
// Do nothing
102+
}
103+
104+
func editor(_ viewController: GutenbergKit.EditorViewController, didCloseModalDialog dialogType: String) {
105+
// Do nothing
106+
}
99107
}

0 commit comments

Comments
 (0)