[iOS] add error when user tries to pushlish list with less then 3 elements

This commit is contained in:
Aleksey Belouosv 2019-02-26 12:28:47 +03:00 committed by Aleksey Belousov
parent aee95072e1
commit 0d752a9ea9

View file

@ -183,7 +183,12 @@ final class BookmarksSharingViewController: MWMTableViewController {
self.dismiss(animated: true)
self.performAfterValidation(anchor: self.uploadAndPublishCell) { [weak self] in
if let self = self {
self.showEditName()
if (self.category.trackCount + self.category.bookmarksCount > 2) {
self.showEditName()
} else {
MWMAlertViewController.activeAlert().presentInfoAlert(L("error_public_not_enough_title"),
text: L("error_public_not_enough_subtitle"))
}
}
}
}