Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Added New Private Tab QuickAction.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon-T committed Jul 16, 2019
1 parent 4b540b4 commit 8688f7d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
3 changes: 3 additions & 0 deletions Client/Application/QuickActions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import XCGLogger

enum ShortcutType: String {
case newTab = "NewTab"
case newPrivateTab = "NewPrivateTab"

init?(fullType: String) {
guard let last = fullType.components(separatedBy: ".").last else { return nil }
Expand Down Expand Up @@ -57,6 +58,8 @@ class QuickActions: NSObject {
switch type {
case .newTab:
handleOpenNewTab(withBrowserViewController: browserViewController, isPrivate: false)
case .newPrivateTab:
handleOpenNewTab(withBrowserViewController: browserViewController, isPrivate: true)
}
}

Expand Down
20 changes: 14 additions & 6 deletions Client/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -109,13 +109,21 @@
<key>UIApplicationShortcutItems</key>
<array>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>quick_action_new_tab</string>
<key>UIApplicationShortcutItemTitle</key>
<string>ShortcutItemTitleNewTab</string>
<key>UIApplicationShortcutItemType</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).NewTab</string>
<key>UIApplicationShortcutItemIconFile</key>
<string>quick_action_new_tab</string>
<key>UIApplicationShortcutItemTitle</key>
<string>ShortcutItemTitleNewTab</string>
<key>UIApplicationShortcutItemType</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).NewTab</string>
</dict>
<dict>
<key>UIApplicationShortcutItemIconFile</key>
<string>quick_action_new_private_tab</string>
<key>UIApplicationShortcutItemTitle</key>
<string>ShortcutItemTitleNewPrivateTab</string>
<key>UIApplicationShortcutItemType</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER).NewPrivateTab</string>
</dict>
</array>
<key>UIBackgroundModes</key>
<array>
Expand Down

0 comments on commit 8688f7d

Please sign in to comment.