From 9575bda7118b7bca7ef29031da44fd3b427f98b1 Mon Sep 17 00:00:00 2001 From: Yishi Lin Date: Thu, 5 Mar 2020 00:19:34 +0800 Subject: [PATCH] Hide the delete cell while adding an entry --- pass/Controllers/PasswordEditorTableViewController.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pass/Controllers/PasswordEditorTableViewController.swift b/pass/Controllers/PasswordEditorTableViewController.swift index 35aa08e..e017b95 100644 --- a/pass/Controllers/PasswordEditorTableViewController.swift +++ b/pass/Controllers/PasswordEditorTableViewController.swift @@ -123,9 +123,12 @@ class PasswordEditorTableViewController: UITableViewController { ], [ [.type: PasswordEditorCellType.scanQRCodeCell], - [.type: PasswordEditorCellType.deletePasswordCell], ] ] + + if self.password != nil { + tableData[additionsSection+1].append([.type: PasswordEditorCellType.deletePasswordCell]) + } updateTableData(withRespectTo: passwordGenerator.flavor) }