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
3232 }
3333
3434 if loggedIn {
35- createLoggedInShortcuts ( )
35+ if hasBlog ( ) {
36+ createLoggedInShortcuts ( )
37+ } else {
38+ clearShortcuts ( )
39+ }
3640 } else {
3741 createLoggedOutShortcuts ( )
3842 }
@@ -99,6 +103,10 @@ public class WP3DTouchShortcutCreator: NSObject
99103 application. shortcutItems = visibleShortcutArray
100104 }
101105
106+ private func clearShortcuts( ) {
107+ application. shortcutItems = nil
108+ }
109+
102110 private func createLoggedOutShortcuts( ) {
103111 application. shortcutItems = loggedOutShortcutArray ( )
104112 }
@@ -122,4 +130,8 @@ public class WP3DTouchShortcutCreator: NSObject
122130
123131 return hasWordPressComAccount ( ) && currentBlog. supports ( BlogFeature . Stats)
124132 }
133+
134+ private func hasBlog( ) -> Bool {
135+ return blogService. blogCountForAllAccounts ( ) > 0
136+ }
125137}
You can’t perform that action at this time.
0 commit comments