Skip to content
This repository was archived by the owner on Dec 13, 2017. It is now read-only.

Commit 933dfb5

Browse files
committed
Merge pull request #748 from wordpress-mobile/issue/747-empty-posts
Bugfix for empty posts on initial load
2 parents 16e4b80 + 41d7ac2 commit 933dfb5

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

Classes/WPEditorViewController.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,6 @@ - (void)viewWillAppear:(BOOL)animated
152152
[super viewWillAppear:animated];
153153

154154
if (!self.isFirstSetupComplete) {
155-
self.isFirstSetupComplete = YES;
156-
157155
// When restoring state, the navigationController is nil when the view loads,
158156
// so configure its appearance here instead.
159157
self.navigationController.navigationBar.translucent = NO;
@@ -174,6 +172,11 @@ - (void)viewDidAppear:(BOOL)animated {
174172
[super viewDidAppear:animated];
175173
if (self.isFirstSetupComplete) {
176174
[self restoreEditSelection];
175+
} else {
176+
// Note: Very important this is set here otherwise the post will not initially
177+
// load properly in the editor. Please be careful if you make a change here and
178+
// test the editor within WPiOS!
179+
self.isFirstSetupComplete = YES;
177180
}
178181
}
179182

0 commit comments

Comments
 (0)