             }
         }
     }
+
+    enum UploadState {
+        case Ready
+        case Uploading
+        case Failed(message: String)
+        case Success
+    }
+    var uploadState: UploadState = .Ready {
+        willSet {
+            switch newValue {
+
+            case .Ready:
+                break
+
+            case .Uploading:
+                postButton.enabled = false
+                messageTextView.resignFirstResponder()
+                YepHUD.showActivityIndicator()
+
+            case .Failed(let message):
+                YepHUD.hideActivityIndicator()
+                postButton.enabled = true
+                YepAlert.alertSorry(message: message, inViewController: self)
+
+            case .Success:
+                YepHUD.hideActivityIndicator()
+                messageTextView.text = nil
+            }
+        }
+    }
     
     private let feedMediaAddCellID = "FeedMediaAddCell"
     private let feedMediaCellID = "FeedMediaCell"

            dispatch_group_notify(uploadImagesGroup, dispatch_get_main_queue()) { [weak self] in

                guard uploadImageInfos.count == mediaImagesCount else {

                    YepHUD.hideActivityIndicator()
                    self?.postButton.enabled = true

                    let message = uploadErrorMessage ?? NSLocalizedString("Upload failed!", comment: "")

                    YepAlert.alertSorry(message: message, inViewController: self)

                    return
                }

    
    @objc private func post(sender: UIBarButtonItem) {

        let messageLength = (messageTextView.text as NSString).length

        guard messageLength <= YepConfig.maxFeedTextLength else {
            let message = String(format: NSLocalizedString("Feed info is too long!\nUp to %d letters.", comment: ""), YepConfig.maxFeedTextLength)
            YepAlert.alertSorry(message: message, inViewController: self)

            return
        }
        
        uploadState = .Uploading
        
        let message = messageTextView.text
        let coordinate = YepLocationService.sharedManager.currentLocation?.coordinate
