summaryrefslogtreecommitdiff
path: root/Juick/ViewControllers
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-05-15 15:34:00 +0300
committerGravatar Vitaly Takmazov2020-05-15 15:34:00 +0300
commitaaa0bc8c2284b95187a51b10e44df26758e96718 (patch)
treed8c6c96da446605d6c88a09f0c420684cdbf687b /Juick/ViewControllers
parentfa86aab338a9b866c240425c15dafdbaf4e0491f (diff)
Selection style
Diffstat (limited to 'Juick/ViewControllers')
-rw-r--r--Juick/ViewControllers/MessagesViewController.h1
-rw-r--r--Juick/ViewControllers/MessagesViewController.m3
-rw-r--r--Juick/ViewControllers/ThreadViewController.m4
3 files changed, 7 insertions, 1 deletions
diff --git a/Juick/ViewControllers/MessagesViewController.h b/Juick/ViewControllers/MessagesViewController.h
index 7025e8b..d2fc935 100644
--- a/Juick/ViewControllers/MessagesViewController.h
+++ b/Juick/ViewControllers/MessagesViewController.h
@@ -19,6 +19,7 @@ extern NSString* const messageCellIdentifier;
@property(nonatomic, strong) NSString *path;
@property(nonatomic, strong) NSDictionary *params;
@property(nonatomic, assign) BOOL shouldScrollToUnreadOnRefresh;
+@property(nonatomic, assign) BOOL shouldAllowToSelectText;
@property(nonatomic) NSNumber * firstUnread;
-(void) refreshData;
diff --git a/Juick/ViewControllers/MessagesViewController.m b/Juick/ViewControllers/MessagesViewController.m
index f61d8b4..8fc6408 100644
--- a/Juick/ViewControllers/MessagesViewController.m
+++ b/Juick/ViewControllers/MessagesViewController.m
@@ -129,7 +129,7 @@ NSString* const messageCellIdentifier = @"messageCell";
} else {
Message *msg = [self.messages objectAtIndex:indexPath.row];
MessageCell *cell = [tableView dequeueReusableCellWithIdentifier:messageCellIdentifier forIndexPath:indexPath];
- [cell configureWithMessage:msg];
+ [cell configureWithMessage:msg selectable:self.shouldAllowToSelectText];
return cell;
}
}
@@ -141,6 +141,7 @@ NSString* const messageCellIdentifier = @"messageCell";
-(void) tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
Message *msg = [self.messages objectAtIndex:indexPath.row];
[self viewThreadForMessage:msg mid:msg.mid scrollTo:0];
+ [self.tableView deselectRowAtIndexPath:indexPath animated:YES];
}
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
diff --git a/Juick/ViewControllers/ThreadViewController.m b/Juick/ViewControllers/ThreadViewController.m
index 8ee7623..fd754cf 100644
--- a/Juick/ViewControllers/ThreadViewController.m
+++ b/Juick/ViewControllers/ThreadViewController.m
@@ -49,4 +49,8 @@
[self refreshData];
}
+- (BOOL)shouldAllowToSelectText {
+ return YES;
+}
+
@end