Permalink
Browse files

Added property to determine last posted message

  • Loading branch information...
myell0w committed Nov 18, 2011
1 parent 893eca9 commit c0ef3b2486180acc8c3e89588589ded046e144e7
Showing with 6 additions and 0 deletions.
  1. +2 −0 MTStatusBarOverlay.h
  2. +4 −0 MTStatusBarOverlay.m
View
@@ -106,6 +106,8 @@ typedef enum MTMessageType {
@property (nonatomic, strong, readonly) NSMutableArray *messageHistory;
// DEPRECATED: enable/disable history-tracking of messages
@property (nonatomic, assign, getter=isHistoryEnabled) BOOL historyEnabled;
+// the last message that was visible
+@property (nonatomic, strong, readonly) NSString *lastPostedMessage;
// determines if immediate messages in the queue get removed or stay in the queue, when a new immediate message gets posted
@property (nonatomic, assign) BOOL canRemoveImmediateMessagesFromQueue;
// the mode of the detailView
View
@@ -184,6 +184,7 @@ @interface MTStatusBarOverlay ()
@property (nonatomic, strong) NSMutableArray *messageHistory;
@property (nonatomic, strong) UITableView *historyTableView;
@property (nonatomic, assign) BOOL forcedToHide;
+@property (nonatomic, strong, readwrite) NSString *lastPostedMessage;
// intern method that posts a new entry to the message-queue
- (void)postMessage:(NSString *)message type:(MTMessageType)messageType duration:(NSTimeInterval)duration animated:(BOOL)animated immediate:(BOOL)immediate;
@@ -265,6 +266,7 @@ @implementation MTStatusBarOverlay
@synthesize historyTableView = historyTableView_;
@synthesize delegate = delegate_;
@synthesize forcedToHide = forcedToHide_;
+@synthesize lastPostedMessage = lastPostedMessage_;
////////////////////////////////////////////////////////////////////////
#pragma mark -
@@ -753,6 +755,8 @@ - (void)showNextMessage {
// show next message
[self performSelector:@selector(showNextMessage) withObject:nil afterDelay:kMinimumMessageVisibleTime];
}
+
+ self.lastPostedMessage = message;
}
- (void)hide {

0 comments on commit c0ef3b2

Please sign in to comment.