summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers/NewPostViewController.m
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-08 14:31:34 +0300
committerGravatar Vitaly Takmazov2018-04-08 16:28:02 +0300
commita18e9ee9a3dc8b7f8ed3074893eac788bc234903 (patch)
treed3390bbf778f243bd8ef15f19d22005a8356e375 /Juick/ViewControllers/NewPostViewController.m
parent2a4770c84aaf2be9c58622f108007facef670fd3 (diff)
fix PM push
Diffstat (limited to 'Juick/ViewControllers/NewPostViewController.m')
-rw-r--r--Juick/ViewControllers/NewPostViewController.m3
1 files changed, 3 insertions, 0 deletions
diff --git a/Juick/ViewControllers/NewPostViewController.m b/Juick/ViewControllers/NewPostViewController.m
index 7b80a52..81121ec 100644
--- a/Juick/ViewControllers/NewPostViewController.m
+++ b/Juick/ViewControllers/NewPostViewController.m
@@ -41,13 +41,16 @@
}
- (IBAction)sendAction:(id)sender {
+ self.navigationController.navigationItem.rightBarButtonItem.enabled = NO;
if (_replyTo == nil) {
[[APIClient sharedClient] postMessage:self.textView.text result:^(Message *msg, NSError *err) {
+ self.navigationController.navigationItem.rightBarButtonItem.enabled = YES;
[self.navigationController popViewControllerAnimated:YES];
[(MessagesViewController *)self.navigationController.visibleViewController refreshData:YES];
}];
} else {
[[APIClient sharedClient] postReplyToThread:_replyTo.mid inReplyTo:_replyTo.rid text:self.textView.text result:^(Message *msg, NSError *err) {
+ self.navigationController.navigationItem.rightBarButtonItem.enabled = YES;
[self.navigationController popViewControllerAnimated:YES];
[(MessagesViewController *)self.navigationController.visibleViewController refreshData:YES];
}];