File tree Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Expand file tree Collapse file tree 5 files changed +16
-11
lines changed Original file line number Diff line number Diff line change @@ -135,7 +135,7 @@ EXTERNAL SOURCES:
135135
136136CHECKOUT OPTIONS:
137137 SignalServiceKit:
138- :commit: c274e3aa30ed07c5166f1bd3bec7097bafab8dc4
138+ :commit: c2cb7c8484326333b5ac9225de993f62fab68c11
139139 :git: https://github.com/WhisperSystems/SignalServiceKit.git
140140 SocketRocket:
141141 :commit: 41b57bb2fc292a814f758441a05243eb38457027
Original file line number Diff line number Diff line change 33// Portions Copyright (c) 2016 Open Whisper Systems. All rights reserved.
44
55#import " OWSDisplayedMessage.h"
6+ #import " TSInfoMessage.h"
67#import " TSMessageAdapter.h"
78
8- typedef NS_ENUM (NSInteger , OWSInfoMessageType) {
9- OWSInfoMessageTypeSessionDidEnd,
10- };
11-
129@interface OWSInfoMessage : OWSDisplayedMessage
1310
14- @property (nonatomic ) OWSInfoMessageType infoMessageType;
11+ @property (nonatomic ) TSInfoMessageType infoMessageType;
1512@property (nonatomic ) TSMessageAdapterType messageType;
1613
1714#pragma mark - Initialization
1815
19- - (instancetype )initWithInfoType : (OWSInfoMessageType )messageType
16+ - (instancetype )initWithInfoType : (TSInfoMessageType )messageType
2017 senderId : (NSString *)senderId
2118 senderDisplayName : (NSString *)senderDisplayName
2219 date : (NSDate *)date ;
Original file line number Diff line number Diff line change 66
77@implementation OWSInfoMessage
88
9- - (instancetype )initWithInfoType : (OWSInfoMessageType )messageType
9+ - (instancetype )initWithInfoType : (TSInfoMessageType )messageType
1010 senderId : (NSString *)senderId
1111 senderDisplayName : (NSString *)senderDisplayName
1212 date : (NSDate *)date
@@ -27,7 +27,7 @@ - (instancetype)initWithInfoType:(OWSInfoMessageType)messageType
2727- (NSString *)text
2828{
2929 switch (self.infoMessageType ) {
30- case OWSInfoMessageTypeSessionDidEnd :
30+ case TSInfoMessageTypeSessionDidEnd :
3131 return [NSString stringWithFormat: @" Session with %@ ended." , self .senderDisplayName];
3232 break ;
3333
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ @interface TSMessageAdapter ()
3333
3434// for InfoMessages
3535
36- @property NSInteger infoMessageType;
36+ @property TSInfoMessageType infoMessageType;
3737
3838// for ErrorMessages
3939
Original file line number Diff line number Diff line change @@ -876,7 +876,15 @@ - (OWSDisplayedMessageCollectionViewCell *)loadInfoMessageCellForMessage:(OWSInf
876876 infoCell.textView .selectable = NO ;
877877
878878 infoCell.messageBubbleContainerView .layer .borderColor = [[UIColor ows_infoMessageBorderColor ] CGColor ];
879- infoCell.headerImageView .image = [UIImage imageNamed: @" warning_white" ];
879+ if (infoMessage.infoMessageType == TSInfoMessageTypeDisappearingMessagesUpdate) {
880+ infoCell.headerImageView .image = [UIImage imageNamed: @" ic_timer" ];
881+ infoCell.headerImageView .backgroundColor = [UIColor whiteColor ];
882+ // Lighten up the broad stroke header icon to match the perceived color of the border.
883+ infoCell.headerImageView .tintColor = [UIColor ows_infoMessageBorderColor ];
884+ } else {
885+ infoCell.headerImageView .image = [UIImage imageNamed: @" warning_white" ];
886+ }
887+
880888
881889 return infoCell;
882890}
You can’t perform that action at this time.
0 commit comments