Inform the UI wether we got new messages or nothing new

This commit is contained in:
Andreas Linde 2012-10-05 15:26:50 +02:00
parent 4839afca97
commit c8809ec038
2 changed files with 6 additions and 8 deletions

View File

@ -572,6 +572,8 @@
[self sendNetworkRequestWithHTTPMethod:@"GET" [self sendNetworkRequestWithHTTPMethod:@"GET"
withText:nil withText:nil
completionHandler:^(NSError *err){ completionHandler:^(NSError *err){
// inform the UI to update its data in case the list is already showing
[[NSNotificationCenter defaultCenter] postNotificationName:BITHockeyFeedbackMessagesUpdated object:nil];
}]; }];
} }
@ -597,11 +599,10 @@
[message setStatus:BITFeedbackMessageStatusSendPending]; [message setStatus:BITFeedbackMessageStatusSendPending];
[self saveMessages]; [self saveMessages];
// inform the UI to update its data in case the list is already showing
[[NSNotificationCenter defaultCenter] postNotificationName:BITHockeyFeedbackMessagesUpdated object:nil];
} }
// inform the UI to update its data in case the list is already showing
[[NSNotificationCenter defaultCenter] postNotificationName:BITHockeyFeedbackMessagesUpdated object:nil];
}]; }];
} }
} }

View File

@ -50,12 +50,9 @@
// Notification message which HockeyManager is listening to, to retry requesting updated from the server // Notification message which HockeyManager is listening to, to retry requesting updated from the server
#define BITHockeyNetworkDidBecomeReachableNotification @"BITHockeyNetworkDidBecomeReachable" #define BITHockeyNetworkDidBecomeReachableNotification @"BITHockeyNetworkDidBecomeReachable"
// Notification message which tells that messages got updated or added // Notification message which tells that loading messages finished
#define BITHockeyFeedbackMessagesUpdated @"BITHockeyFeedbackMessagesUpdated" #define BITHockeyFeedbackMessagesUpdated @"BITHockeyFeedbackMessagesUpdated"
// Notification message which tells that new messages arrived
#define BITHockeyFeedbackNewMessagesReceived @"BITHockeyFeedbackNewMessagesReceived"
// hockey api error domain // hockey api error domain
typedef enum { typedef enum {