Permalink
Browse files

Fixed history crash, closes #41

  • Loading branch information...
1 parent ba1a332 commit ba05606622578da976a083ed01bb45b10d793e46 @myell0w committed Mar 14, 2012
Showing with 4 additions and 5 deletions.
  1. +4 −5 MTStatusBarOverlay.m
@@ -1078,9 +1078,8 @@ - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(N
#pragma mark Gesture Recognizer
////////////////////////////////////////////////////////////////////////
-- (IBAction)contentViewClicked:(UIGestureRecognizer *)gestureRecognizer {
+- (void)contentViewClicked:(UIGestureRecognizer *)gestureRecognizer {
if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
-
// if we are currently in a special state, restore to normal
// and ignore current set animation in that case
if (self.shrinked) {
@@ -1110,7 +1109,7 @@ - (IBAction)contentViewClicked:(UIGestureRecognizer *)gestureRecognizer {
}
}
-- (IBAction)contentViewSwipedUp:(UIGestureRecognizer *)gestureRecognizer {
+- (void)contentViewSwipedUp:(UIGestureRecognizer *)gestureRecognizer {
if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
[self setDetailViewHidden:YES animated:YES];
@@ -1120,7 +1119,7 @@ - (IBAction)contentViewSwipedUp:(UIGestureRecognizer *)gestureRecognizer {
}
}
-- (IBAction)contentViewSwipedDown:(UIGestureRecognizer *)gestureRecognizer {
+- (void)contentViewSwipedDown:(UIGestureRecognizer *)gestureRecognizer {
if (gestureRecognizer.state == UIGestureRecognizerStateEnded) {
[self setDetailViewHidden:NO animated:YES];
@@ -1369,7 +1368,7 @@ - (void)addMessageToHistory:(NSString *)message {
[self.messageHistory addObject:message];
if (self.historyEnabled) {
- NSIndexPath *newHistoryMessageIndexPath = [NSIndexPath indexPathForRow:self.messageHistory.count inSection:0];
+ NSIndexPath *newHistoryMessageIndexPath = [NSIndexPath indexPathForRow:self.messageHistory.count-1 inSection:0];
[self setDetailViewHidden:self.detailViewHidden animated:YES];
// update history table-view

0 comments on commit ba05606

Please sign in to comment.