Skip to content

Commit 85beb93

Browse files
committed
Style timer changes less alarmingly.
// FREEBIE
1 parent 89df8dd commit 85beb93

File tree

5 files changed

+16
-11
lines changed

5 files changed

+16
-11
lines changed

Podfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ EXTERNAL SOURCES:
135135

136136
CHECKOUT OPTIONS:
137137
SignalServiceKit:
138-
:commit: c274e3aa30ed07c5166f1bd3bec7097bafab8dc4
138+
:commit: c2cb7c8484326333b5ac9225de993f62fab68c11
139139
:git: https://github.com/WhisperSystems/SignalServiceKit.git
140140
SocketRocket:
141141
:commit: 41b57bb2fc292a814f758441a05243eb38457027

Signal/src/Models/OWSInfoMessage.h

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,17 @@
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;

Signal/src/Models/OWSInfoMessage.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
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

Signal/src/Models/TSMessageAdapaters/TSMessageAdapter.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

Signal/src/view controllers/MessagesViewController.m

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)