Skip to content

Instantly share code, notes, and snippets.

@shiki
Created July 8, 2019 23:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shiki/83d16c7bab88cc822c66bcf8d98de79c to your computer and use it in GitHub Desktop.
Save shiki/83d16c7bab88cc822c66bcf8d98de79c to your computer and use it in GitHub Desktop.
WordPress-iOS: Make Post button enable Quick Start for the current site
diff --git a/WordPress/Classes/ViewRelated/System/WPTabBarController+QuickStart.swift b/WordPress/Classes/ViewRelated/System/WPTabBarController+QuickStart.swift
index 65f057b33e..f89e1f21c2 100644
--- a/WordPress/Classes/ViewRelated/System/WPTabBarController+QuickStart.swift
+++ b/WordPress/Classes/ViewRelated/System/WPTabBarController+QuickStart.swift
@@ -47,4 +47,9 @@ extension WPTabBarController {
NotificationCenter.default.removeObserver(quickStartObserver as Any)
quickStartObserver = nil
}
+
+ #warning("Temporary code. Do not commit.")
+ @objc func setupQS(for blog: Blog) {
+ QuickStartTourGuide.find()?.setup(for: blog)
+ }
}
diff --git a/WordPress/Classes/ViewRelated/System/WPTabBarController.m b/WordPress/Classes/ViewRelated/System/WPTabBarController.m
index ae00781062..2512742389 100644
--- a/WordPress/Classes/ViewRelated/System/WPTabBarController.m
+++ b/WordPress/Classes/ViewRelated/System/WPTabBarController.m
@@ -536,6 +536,9 @@ static CGFloat const WPTabBarIconSize = 32.0f;
if (!blog) {
blog = [self currentlyVisibleBlog];
+ #warning Temporary code. Do not commit.
+ [self setupQSFor:blog];
+
if (blog == nil) {
NSManagedObjectContext *context = [[ContextManager sharedInstance] mainContext];
BlogService *blogService = [[BlogService alloc] initWithManagedObjectContext:context];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment