From 6e438b6129ee0c4de8884fd3996ed3a1fc02e6c7 Mon Sep 17 00:00:00 2001 From: Momo Ozawa Date: Tue, 20 Jun 2023 17:06:10 +0100 Subject: [PATCH] remove isBlazeApproved attribute --- MIGRATIONS.md | 6 + WordPress/Classes/Models/Blog.h | 1 - WordPress/Classes/Models/Blog.m | 1 - .../WordPress.xcdatamodeld/.xccurrentversion | 2 +- .../WordPress 150.xcdatamodel/contents | 1031 +++++++++++++++++ WordPress/WordPress.xcodeproj/project.pbxproj | 4 +- WordPress/WordPressTest/BlogBuilder.swift | 6 +- .../WordPressTest/PostActionSheetTests.swift | 2 +- 8 files changed, 1045 insertions(+), 8 deletions(-) create mode 100644 WordPress/Classes/WordPress.xcdatamodeld/WordPress 150.xcdatamodel/contents diff --git a/MIGRATIONS.md b/MIGRATIONS.md index 855d36bf68fe..78bedcc79b39 100644 --- a/MIGRATIONS.md +++ b/MIGRATIONS.md @@ -3,6 +3,12 @@ This file documents changes in the data model. Please explain any changes to the data model as well as any custom migrations. +## WordPress 150 + +@momozw 2023-06-20 + +- `Blog`: removed `isBlazeApproved` attribute. + ## WordPress 149 @dvdchr 2023-05-16 diff --git a/WordPress/Classes/Models/Blog.h b/WordPress/Classes/Models/Blog.h index c90d1fce19b1..5d59bd92d52f 100644 --- a/WordPress/Classes/Models/Blog.h +++ b/WordPress/Classes/Models/Blog.h @@ -168,7 +168,6 @@ typedef NS_ENUM(NSInteger, SiteVisibility) { @property (nonatomic, strong, readwrite, nullable) NSDictionary *capabilities; @property (nonatomic, strong, readwrite, nullable) NSSet *quickStartTours; @property (nonatomic, strong, readwrite, nullable) NSNumber *quickStartTypeValue; -@property (nonatomic, assign, readwrite) BOOL isBlazeApproved; /// The blog's user ID for the current user @property (nonatomic, strong, readwrite, nullable) NSNumber *userID; /// Disk quota for site, this is only available for WP.com sites diff --git a/WordPress/Classes/Models/Blog.m b/WordPress/Classes/Models/Blog.m index e11f5e640dc7..454c81022ebe 100644 --- a/WordPress/Classes/Models/Blog.m +++ b/WordPress/Classes/Models/Blog.m @@ -87,7 +87,6 @@ @implementation Blog @dynamic capabilities; @dynamic quickStartTours; @dynamic quickStartTypeValue; -@dynamic isBlazeApproved; @dynamic userID; @dynamic quotaSpaceAllowed; @dynamic quotaSpaceUsed; diff --git a/WordPress/Classes/WordPress.xcdatamodeld/.xccurrentversion b/WordPress/Classes/WordPress.xcdatamodeld/.xccurrentversion index 040a12ba47af..ebc7bef3f617 100644 --- a/WordPress/Classes/WordPress.xcdatamodeld/.xccurrentversion +++ b/WordPress/Classes/WordPress.xcdatamodeld/.xccurrentversion @@ -3,6 +3,6 @@ _XCCurrentVersionName - WordPress 149.xcdatamodel + WordPress 150.xcdatamodel diff --git a/WordPress/Classes/WordPress.xcdatamodeld/WordPress 150.xcdatamodel/contents b/WordPress/Classes/WordPress.xcdatamodeld/WordPress 150.xcdatamodel/contents new file mode 100644 index 000000000000..68778a9430df --- /dev/null +++ b/WordPress/Classes/WordPress.xcdatamodeld/WordPress 150.xcdatamodel/contents @@ -0,0 +1,1031 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/WordPress/WordPress.xcodeproj/project.pbxproj b/WordPress/WordPress.xcodeproj/project.pbxproj index 9b822f43d848..40db1e20dbd6 100644 --- a/WordPress/WordPress.xcodeproj/project.pbxproj +++ b/WordPress/WordPress.xcodeproj/project.pbxproj @@ -9163,6 +9163,7 @@ FA3536F425B01A2C0005A3A0 /* JetpackRestoreCompleteViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JetpackRestoreCompleteViewController.swift; sourceTree = ""; }; FA3A28172A38D36900206D74 /* BlazeCampaignTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlazeCampaignTableViewCell.swift; sourceTree = ""; }; FA3A281A2A39C8FF00206D74 /* BlazeCampaignSingleStatView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlazeCampaignSingleStatView.swift; sourceTree = ""; }; + FA3A281D2A42049F00206D74 /* WordPress 150.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "WordPress 150.xcdatamodel"; sourceTree = ""; }; FA3FBF8A2A2772340012FC90 /* DashboardActivityLogViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardActivityLogViewModel.swift; sourceTree = ""; }; FA3FBF8D2A2777E00012FC90 /* DashboardActivityLogViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DashboardActivityLogViewModelTests.swift; sourceTree = ""; }; FA41044C263932AC00E90EBF /* ActivityLogScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActivityLogScreen.swift; sourceTree = ""; }; @@ -30654,6 +30655,7 @@ E125443B12BF5A7200D87A0A /* WordPress.xcdatamodeld */ = { isa = XCVersionGroup; children = ( + FA3A281D2A42049F00206D74 /* WordPress 150.xcdatamodel */, FE5096572A13D5BA00DDD071 /* WordPress 149.xcdatamodel */, FA98B61329A39DA80071AAE8 /* WordPress 148.xcdatamodel */, F48D44B7298993900051EAA6 /* WordPress 147.xcdatamodel */, @@ -30804,7 +30806,7 @@ 8350E15911D28B4A00A7B073 /* WordPress.xcdatamodel */, E125443D12BF5A7200D87A0A /* WordPress 2.xcdatamodel */, ); - currentVersion = FE5096572A13D5BA00DDD071 /* WordPress 149.xcdatamodel */; + currentVersion = FA3A281D2A42049F00206D74 /* WordPress 150.xcdatamodel */; name = WordPress.xcdatamodeld; path = Classes/WordPress.xcdatamodeld; sourceTree = ""; diff --git a/WordPress/WordPressTest/BlogBuilder.swift b/WordPress/WordPressTest/BlogBuilder.swift index 5374d8eab122..6242bbe5d624 100644 --- a/WordPress/WordPressTest/BlogBuilder.swift +++ b/WordPress/WordPressTest/BlogBuilder.swift @@ -103,9 +103,9 @@ final class BlogBuilder { return self } - func isBlazeApproved() -> Self { - blog.isBlazeApproved = true - + func canBlaze() -> Self { + set(blogOption: "can_blaze", value: true) + blog.isAdmin = true return self } diff --git a/WordPress/WordPressTest/PostActionSheetTests.swift b/WordPress/WordPressTest/PostActionSheetTests.swift index 1539fb82ee31..387c7a87c0de 100644 --- a/WordPress/WordPressTest/PostActionSheetTests.swift +++ b/WordPress/WordPressTest/PostActionSheetTests.swift @@ -151,7 +151,7 @@ class PostActionSheetTests: CoreDataTestCase { try featureFlags.override(RemoteFeatureFlag.blaze, withValue: true) let blog = BlogBuilder(mainContext) - .isBlazeApproved() + .canBlaze() .build() let post = PostBuilder(mainContext, blog: blog)