Skip to content

Commit

Permalink
Only show existing shortcuts section if there are some shortcuts to show
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 committed Sep 24, 2018
1 parent f20e4a4 commit 2291289
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions HomeAssistant/Views/SettingsDetailViewController.swift
Expand Up @@ -299,10 +299,12 @@ class SettingsDetailViewController: FormViewController {

self.title = L10n.SettingsDetails.Siri.title
if #available(iOS 12.0, *) {
self.form
+++ Section(header: "Existing Shortcuts", footer: "")
let realm = Current.realm()
let shortcuts = realm.objects(SiriShortcut.self).map { $0 }
if shortcuts.count > 0 {
self.form
+++ Section(header: "Existing Shortcuts", footer: "")
}
for shortcut in shortcuts {
self.form.last!
<<< ButtonRow {
Expand Down

0 comments on commit 2291289

Please sign in to comment.