summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-11-01 18:46:13 +0300
committerGravatar Vitaly Takmazov2018-11-01 18:46:13 +0300
commit9a0a039c5df78526bba67f6bef93e431cf94430a (patch)
tree7dc787956555ccfebf95ad38fb2baf81640b9a1d
parentd5ffc51c8d1721e53d92dd919a36c72b43d05c45 (diff)
Link MessageCell and Message
-rw-r--r--Juick/Supporting Files/Juick-Info.plist2
-rw-r--r--Juick/ViewControllers/ThreadViewController.m2
-rw-r--r--Juick/Views/ContentLoadingCell.m1
-rw-r--r--Juick/Views/MessageCell.h2
-rw-r--r--Juick/Views/MessageCell.m1
-rw-r--r--JuickPush/Info.plist2
6 files changed, 7 insertions, 3 deletions
diff --git a/Juick/Supporting Files/Juick-Info.plist b/Juick/Supporting Files/Juick-Info.plist
index 2fa5ee4..3b9b7ba 100644
--- a/Juick/Supporting Files/Juick-Info.plist
+++ b/Juick/Supporting Files/Juick-Info.plist
@@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
- <string>77</string>
+ <string>78</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
diff --git a/Juick/ViewControllers/ThreadViewController.m b/Juick/ViewControllers/ThreadViewController.m
index 3b6854c..8e64cb9 100644
--- a/Juick/ViewControllers/ThreadViewController.m
+++ b/Juick/ViewControllers/ThreadViewController.m
@@ -30,7 +30,7 @@
-(void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqual: @"replySegue"]) {
- Message *msg = [self.messages objectAtIndex:[self.tableView indexPathForSelectedRow].row];
+ Message *msg = ((MessageCell *)sender).message;
NewPostViewController *postVC = (NewPostViewController *)segue.destinationViewController;
[postVC setReplyTo:msg];
}
diff --git a/Juick/Views/ContentLoadingCell.m b/Juick/Views/ContentLoadingCell.m
index 5ec67b3..90329fa 100644
--- a/Juick/Views/ContentLoadingCell.m
+++ b/Juick/Views/ContentLoadingCell.m
@@ -12,6 +12,7 @@
- (void)awakeFromNib {
[super awakeFromNib];
+ self.userInteractionEnabled = NO;
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
diff --git a/Juick/Views/MessageCell.h b/Juick/Views/MessageCell.h
index d9a5533..abb1347 100644
--- a/Juick/Views/MessageCell.h
+++ b/Juick/Views/MessageCell.h
@@ -24,6 +24,8 @@
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *attachmentHeight;
@property (weak, nonatomic) IBOutlet UILabel *summary;
+@property (nonatomic, weak) Message *message;
+
@property (nonatomic, strong) id<MessageCellDelegate> delegate;
- (void) configureWithMessage:(Message *)msg;
diff --git a/Juick/Views/MessageCell.m b/Juick/Views/MessageCell.m
index cf23f62..ffb564a 100644
--- a/Juick/Views/MessageCell.m
+++ b/Juick/Views/MessageCell.m
@@ -30,6 +30,7 @@
}
- (void) configureWithMessage:(Message *)msg {
+ self.message = msg;
self.avatar.image = nil;
__weak UIImageView *weakAvatar = self.avatar;
[self.avatar setImageWithURLRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://i.juick.com/a/%d.png", [msg.user.uid intValue]]]] placeholderImage:nil success:^(NSURLRequest * _Nonnull request, NSHTTPURLResponse * _Nullable response, UIImage * _Nonnull image) {
diff --git a/JuickPush/Info.plist b/JuickPush/Info.plist
index c40536c..153f60b 100644
--- a/JuickPush/Info.plist
+++ b/JuickPush/Info.plist
@@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
- <string>77</string>
+ <string>78</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>