Chat screen: Display network status, and handle unsent messages.

This commit is contained in:
giomfo
2016-02-25 13:54:53 +01:00
parent edf33d94ac
commit 7539e3a726
10 changed files with 279 additions and 60 deletions
@@ -20,16 +20,42 @@
/**
`RoomExtraInfosInfoView` instance is a view used to display extra information
*/
@interface RoomActivitiesView : MXKRoomActivitiesView
@interface RoomActivitiesView : MXKRoomActivitiesView <UIGestureRecognizerDelegate>
@property (weak, nonatomic) IBOutlet UIView *separatorView;
@property (weak, nonatomic) IBOutlet UIImageView *typingImageView;
@property (weak, nonatomic) IBOutlet UIImageView *iconImageView;
@property (weak, nonatomic) IBOutlet UILabel *messageLabel;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *mainHeightConstraint;
/**
Notify that some messages are not sent.
Replace the current notification if any.
@param labelText the notification message
@param onLabelTapGesture block called when user taps on label.
*/
- (void)displayUnsentMessagesNotification:(NSAttributedString*)labelText onLabelTapGesture:(void (^)(void))onLabelTapGesture;
/**
Display network error.
Replace the current notification if any.
@param labelText the notification message
*/
- (void)displayNetworkErrorNotification:(NSString*)labelText;
/**
Display a typing notification.
Replace the current notification if any.
@param labelText the current typing message.
*/
- (void)displayTypingNotification:(NSString*)labelText;
/**
Remove any displayed information.
*/
- (void)reset;
// update the displayed typing message.
// nil message hides the typing icon too.
- (void)updateTypingMessage:(NSString*)message;
@end