From 755f46094d80776a550d907569d2d91c364af2f9 Mon Sep 17 00:00:00 2001 From: "o.bolovintseva" Date: Tue, 27 Nov 2018 13:38:37 +0300 Subject: [PATCH] [ios] [mapsme-8978] - disable last category deleting from list settings --- .../CategorySettings.storyboard | 19 +++++++++++++++---- .../CategorySettingsViewController.swift | 2 ++ 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/iphone/Maps/Bookmarks/Categories/Category settings/CategorySettings.storyboard b/iphone/Maps/Bookmarks/Categories/Category settings/CategorySettings.storyboard index ca48817890..00d8c99b1d 100644 --- a/iphone/Maps/Bookmarks/Categories/Category settings/CategorySettings.storyboard +++ b/iphone/Maps/Bookmarks/Categories/Category settings/CategorySettings.storyboard @@ -137,16 +137,18 @@ - + - + + + + + + @@ -174,6 +184,7 @@ + diff --git a/iphone/Maps/Bookmarks/Categories/Category settings/CategorySettingsViewController.swift b/iphone/Maps/Bookmarks/Categories/Category settings/CategorySettingsViewController.swift index 0ad4dd59c0..c63f96fda1 100644 --- a/iphone/Maps/Bookmarks/Categories/Category settings/CategorySettingsViewController.swift +++ b/iphone/Maps/Bookmarks/Categories/Category settings/CategorySettingsViewController.swift @@ -24,6 +24,7 @@ class CategorySettingsViewController: MWMTableViewController { @IBOutlet private weak var descriptionTextView: UITextView! @IBOutlet private weak var descriptionCell: UITableViewCell! @IBOutlet private weak var saveButton: UIBarButtonItem! + @IBOutlet private weak var deleteListButton: UIButton! override func viewDidLoad() { super.viewDidLoad() @@ -32,6 +33,7 @@ class CategorySettingsViewController: MWMTableViewController { assert(categoryId != MWMFrameworkHelper.invalidCategoryId(), "must provide category info") + deleteListButton.isEnabled = (manager.groupsIdList().count > 1) nameTextField.text = manager.getCategoryName(categoryId) descriptionTextView.text = manager.getCategoryDescription(categoryId) configureAccessStatus()