File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
WordPress/Classes/System/3DTouch Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,11 @@ public class WP3DTouchShortcutCreator: NSObject
32
32
}
33
33
34
34
if loggedIn {
35
- createLoggedInShortcuts ( )
35
+ if hasBlog ( ) {
36
+ createLoggedInShortcuts ( )
37
+ } else {
38
+ clearShortcuts ( )
39
+ }
36
40
} else {
37
41
createLoggedOutShortcuts ( )
38
42
}
@@ -99,6 +103,10 @@ public class WP3DTouchShortcutCreator: NSObject
99
103
application. shortcutItems = visibleShortcutArray
100
104
}
101
105
106
+ private func clearShortcuts( ) {
107
+ application. shortcutItems = nil
108
+ }
109
+
102
110
private func createLoggedOutShortcuts( ) {
103
111
application. shortcutItems = loggedOutShortcutArray ( )
104
112
}
@@ -122,4 +130,8 @@ public class WP3DTouchShortcutCreator: NSObject
122
130
123
131
return hasWordPressComAccount ( ) && currentBlog. supports ( BlogFeature . Stats)
124
132
}
133
+
134
+ private func hasBlog( ) -> Bool {
135
+ return blogService. blogCountForAllAccounts ( ) > 0
136
+ }
125
137
}
You can’t perform that action at this time.
0 commit comments