Reduce usage of JSQ.
This commit is contained in:
parent
d3ea8582b6
commit
3964b78ff7
|
@ -148,6 +148,7 @@
|
||||||
34641E1B2088DA4100E2EDE5 /* ScreenLockViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34641E192088DA3F00E2EDE5 /* ScreenLockViewController.m */; };
|
34641E1B2088DA4100E2EDE5 /* ScreenLockViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34641E192088DA3F00E2EDE5 /* ScreenLockViewController.m */; };
|
||||||
34641E1C2088DA4100E2EDE5 /* ScreenLockViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 34641E1A2088DA4000E2EDE5 /* ScreenLockViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
34641E1C2088DA4100E2EDE5 /* ScreenLockViewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 34641E1A2088DA4000E2EDE5 /* ScreenLockViewController.h */; settings = {ATTRIBUTES = (Public, ); }; };
|
||||||
34641E1F2088DA6D00E2EDE5 /* SAEScreenLockViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34641E1E2088DA6D00E2EDE5 /* SAEScreenLockViewController.m */; };
|
34641E1F2088DA6D00E2EDE5 /* SAEScreenLockViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 34641E1E2088DA6D00E2EDE5 /* SAEScreenLockViewController.m */; };
|
||||||
|
34661FB820C1C0D60056EDD6 /* message_sent.aiff in Resources */ = {isa = PBXBuildFile; fileRef = 34661FB720C1C0D60056EDD6 /* message_sent.aiff */; };
|
||||||
346B66311F4E29B200E5122F /* CropScaleImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 346B66301F4E29B200E5122F /* CropScaleImageViewController.swift */; };
|
346B66311F4E29B200E5122F /* CropScaleImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 346B66301F4E29B200E5122F /* CropScaleImageViewController.swift */; };
|
||||||
347850311FD7494A007B8332 /* dripicons-v2.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 34330A5B1E787A9800DF2FB9 /* dripicons-v2.ttf */; };
|
347850311FD7494A007B8332 /* dripicons-v2.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 34330A5B1E787A9800DF2FB9 /* dripicons-v2.ttf */; };
|
||||||
347850321FD7494A007B8332 /* ElegantIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 34330A5D1E787BD800DF2FB9 /* ElegantIcons.ttf */; };
|
347850321FD7494A007B8332 /* ElegantIcons.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 34330A5D1E787BD800DF2FB9 /* ElegantIcons.ttf */; };
|
||||||
|
@ -757,6 +758,7 @@
|
||||||
34641E1A2088DA4000E2EDE5 /* ScreenLockViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScreenLockViewController.h; path = SignalMessaging/ViewControllers/ScreenLockViewController.h; sourceTree = SOURCE_ROOT; };
|
34641E1A2088DA4000E2EDE5 /* ScreenLockViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScreenLockViewController.h; path = SignalMessaging/ViewControllers/ScreenLockViewController.h; sourceTree = SOURCE_ROOT; };
|
||||||
34641E1D2088DA6C00E2EDE5 /* SAEScreenLockViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SAEScreenLockViewController.h; sourceTree = "<group>"; };
|
34641E1D2088DA6C00E2EDE5 /* SAEScreenLockViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SAEScreenLockViewController.h; sourceTree = "<group>"; };
|
||||||
34641E1E2088DA6D00E2EDE5 /* SAEScreenLockViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SAEScreenLockViewController.m; sourceTree = "<group>"; };
|
34641E1E2088DA6D00E2EDE5 /* SAEScreenLockViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SAEScreenLockViewController.m; sourceTree = "<group>"; };
|
||||||
|
34661FB720C1C0D60056EDD6 /* message_sent.aiff */ = {isa = PBXFileReference; lastKnownFileType = audio.aiff; name = message_sent.aiff; path = Signal/AudioFiles/message_sent.aiff; sourceTree = SOURCE_ROOT; };
|
||||||
346B66301F4E29B200E5122F /* CropScaleImageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CropScaleImageViewController.swift; sourceTree = "<group>"; };
|
346B66301F4E29B200E5122F /* CropScaleImageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CropScaleImageViewController.swift; sourceTree = "<group>"; };
|
||||||
347850561FD86544007B8332 /* SAEFailedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SAEFailedViewController.swift; sourceTree = "<group>"; };
|
347850561FD86544007B8332 /* SAEFailedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SAEFailedViewController.swift; sourceTree = "<group>"; };
|
||||||
347850581FD9972E007B8332 /* SwiftSingletons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftSingletons.swift; sourceTree = "<group>"; };
|
347850581FD9972E007B8332 /* SwiftSingletons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftSingletons.swift; sourceTree = "<group>"; };
|
||||||
|
@ -1279,6 +1281,7 @@
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
45A2F004204473A3002E978A /* NewMessage.aifc */,
|
45A2F004204473A3002E978A /* NewMessage.aifc */,
|
||||||
|
34661FB720C1C0D60056EDD6 /* message_sent.aiff */,
|
||||||
34CF0783203E6B77005C4D61 /* busy_tone_ansi.caf */,
|
34CF0783203E6B77005C4D61 /* busy_tone_ansi.caf */,
|
||||||
34CF0786203E6B78005C4D61 /* end_call_tone_cept.caf */,
|
34CF0786203E6B78005C4D61 /* end_call_tone_cept.caf */,
|
||||||
34074FC5203E5435004596AE /* messageReceivedSounds */,
|
34074FC5203E5435004596AE /* messageReceivedSounds */,
|
||||||
|
@ -2747,6 +2750,7 @@
|
||||||
34CF0788203E6B78005C4D61 /* ringback_tone_ansi.caf in Resources */,
|
34CF0788203E6B78005C4D61 /* ringback_tone_ansi.caf in Resources */,
|
||||||
34C3C78F2040A4F70000134C /* sonarping.mp3 in Resources */,
|
34C3C78F2040A4F70000134C /* sonarping.mp3 in Resources */,
|
||||||
AD83FF431A73426500B5C81A /* audio_play_button@2x.png in Resources */,
|
AD83FF431A73426500B5C81A /* audio_play_button@2x.png in Resources */,
|
||||||
|
34661FB820C1C0D60056EDD6 /* message_sent.aiff in Resources */,
|
||||||
45CB2FA81CB7146C00E1B343 /* Launch Screen.storyboard in Resources */,
|
45CB2FA81CB7146C00E1B343 /* Launch Screen.storyboard in Resources */,
|
||||||
34B3F8781E8DF1700035BE1A /* ContactsPicker.xib in Resources */,
|
34B3F8781E8DF1700035BE1A /* ContactsPicker.xib in Resources */,
|
||||||
B633C5C31A1D190B0059AC12 /* mute_off@2x.png in Resources */,
|
B633C5C31A1D190B0059AC12 /* mute_off@2x.png in Resources */,
|
||||||
|
|
Binary file not shown.
|
@ -52,9 +52,9 @@ public class AccountManager: NSObject {
|
||||||
|
|
||||||
Logger.debug("\(self.TAG) registering with signal server")
|
Logger.debug("\(self.TAG) registering with signal server")
|
||||||
let registrationPromise: Promise<Void> = firstly {
|
let registrationPromise: Promise<Void> = firstly {
|
||||||
self.registerForTextSecure(verificationCode: verificationCode, pin: pin)
|
return self.registerForTextSecure(verificationCode: verificationCode, pin: pin)
|
||||||
}.then {
|
}.then {
|
||||||
self.syncPushTokens()
|
return self.syncPushTokens()
|
||||||
}.recover { (error) -> Promise<Void> in
|
}.recover { (error) -> Promise<Void> in
|
||||||
switch error {
|
switch error {
|
||||||
case PushRegistrationError.pushNotSupported(let description):
|
case PushRegistrationError.pushNotSupported(let description):
|
||||||
|
|
|
@ -41,12 +41,6 @@
|
||||||
#import "UIViewController+Permissions.h"
|
#import "UIViewController+Permissions.h"
|
||||||
#import "ViewControllerUtils.h"
|
#import "ViewControllerUtils.h"
|
||||||
#import <AxolotlKit/NSData+keyVersionByte.h>
|
#import <AxolotlKit/NSData+keyVersionByte.h>
|
||||||
#import <JSQMessagesViewController/JSQMediaItem.h>
|
|
||||||
#import <JSQMessagesViewController/JSQMessagesBubbleImage.h>
|
|
||||||
#import <JSQMessagesViewController/JSQMessagesBubbleImageFactory.h>
|
|
||||||
#import <JSQMessagesViewController/JSQMessagesMediaViewBubbleImageMasker.h>
|
|
||||||
#import <JSQMessagesViewController/UIColor+JSQMessages.h>
|
|
||||||
#import <JSQSystemSoundPlayer/JSQSystemSoundPlayer.h>
|
|
||||||
#import <PureLayout/PureLayout.h>
|
#import <PureLayout/PureLayout.h>
|
||||||
#import <Reachability/Reachability.h>
|
#import <Reachability/Reachability.h>
|
||||||
#import <SignalMessaging/AttachmentSharing.h>
|
#import <SignalMessaging/AttachmentSharing.h>
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
#import "OWSAudioMessageView.h"
|
#import "OWSAudioMessageView.h"
|
||||||
#import "ConversationViewItem.h"
|
#import "ConversationViewItem.h"
|
||||||
#import "Signal-Swift.h"
|
#import "Signal-Swift.h"
|
||||||
#import "UIColor+JSQMessages.h"
|
|
||||||
#import "UIColor+OWS.h"
|
#import "UIColor+OWS.h"
|
||||||
#import "ViewControllerUtils.h"
|
#import "ViewControllerUtils.h"
|
||||||
#import <SignalMessaging/OWSFormat.h>
|
#import <SignalMessaging/OWSFormat.h>
|
||||||
|
#import <SignalMessaging/UIColor+OWS.h>
|
||||||
#import <SignalServiceKit/MIMETypeUtil.h>
|
#import <SignalServiceKit/MIMETypeUtil.h>
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@ -179,7 +179,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
- (UIColor *)bubbleBackgroundColor
|
- (UIColor *)bubbleBackgroundColor
|
||||||
{
|
{
|
||||||
return self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
return self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)isVoiceMessage
|
- (BOOL)isVoiceMessage
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
#import "OWSContactOffersCell.h"
|
#import "OWSContactOffersCell.h"
|
||||||
#import "ConversationViewItem.h"
|
#import "ConversationViewItem.h"
|
||||||
#import "NSBundle+JSQMessages.h"
|
|
||||||
#import <JSQMessagesViewController/UIView+JSQMessages.h>
|
|
||||||
#import <SignalMessaging/OWSContactOffersInteraction.h>
|
#import <SignalMessaging/OWSContactOffersInteraction.h>
|
||||||
#import <SignalMessaging/UIColor+OWS.h>
|
#import <SignalMessaging/UIColor+OWS.h>
|
||||||
#import <SignalMessaging/UIFont+OWS.h>
|
#import <SignalMessaging/UIFont+OWS.h>
|
||||||
|
@ -139,7 +137,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
OWSContactOffersInteraction *interaction = (OWSContactOffersInteraction *)self.viewItem.interaction;
|
OWSContactOffersInteraction *interaction = (OWSContactOffersInteraction *)self.viewItem.interaction;
|
||||||
|
|
||||||
// We're using a bit of a hack to get JSQ to layout this and the unread indicator as
|
// We're using a bit of a hack to get this and the unread indicator to layout as
|
||||||
// "full width" cells. These cells will end up with an erroneous left margin that we
|
// "full width" cells. These cells will end up with an erroneous left margin that we
|
||||||
// want to reverse.
|
// want to reverse.
|
||||||
CGFloat contentWidth = self.width;
|
CGFloat contentWidth = self.width;
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
#import "OWSContactShareView.h"
|
#import "OWSContactShareView.h"
|
||||||
#import "OWSContactAvatarBuilder.h"
|
#import "OWSContactAvatarBuilder.h"
|
||||||
#import "Signal-Swift.h"
|
#import "Signal-Swift.h"
|
||||||
#import "UIColor+JSQMessages.h"
|
|
||||||
#import "UIColor+OWS.h"
|
#import "UIColor+OWS.h"
|
||||||
#import "UIFont+OWS.h"
|
#import "UIFont+OWS.h"
|
||||||
#import "UIView+OWS.h"
|
#import "UIView+OWS.h"
|
||||||
#import <SignalMessaging/Environment.h>
|
#import <SignalMessaging/Environment.h>
|
||||||
#import <SignalMessaging/SignalMessaging-Swift.h>
|
#import <SignalMessaging/SignalMessaging-Swift.h>
|
||||||
|
#import <SignalMessaging/UIColor+OWS.h>
|
||||||
#import <SignalServiceKit/OWSContact.h>
|
#import <SignalServiceKit/OWSContact.h>
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_BEGIN
|
NS_ASSUME_NONNULL_BEGIN
|
||||||
|
@ -145,7 +145,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
- (UIColor *)bubbleBackgroundColor
|
- (UIColor *)bubbleBackgroundColor
|
||||||
{
|
{
|
||||||
return self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
return self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
+ (UIFont *)nameFont
|
+ (UIFont *)nameFont
|
||||||
|
|
|
@ -4,13 +4,13 @@
|
||||||
|
|
||||||
#import "OWSGenericAttachmentView.h"
|
#import "OWSGenericAttachmentView.h"
|
||||||
#import "OWSBezierPathView.h"
|
#import "OWSBezierPathView.h"
|
||||||
#import "UIColor+JSQMessages.h"
|
|
||||||
#import "UIColor+OWS.h"
|
#import "UIColor+OWS.h"
|
||||||
#import "UIFont+OWS.h"
|
#import "UIFont+OWS.h"
|
||||||
#import "UIView+OWS.h"
|
#import "UIView+OWS.h"
|
||||||
#import "ViewControllerUtils.h"
|
#import "ViewControllerUtils.h"
|
||||||
#import <SignalMessaging/NSString+OWS.h>
|
#import <SignalMessaging/NSString+OWS.h>
|
||||||
#import <SignalMessaging/OWSFormat.h>
|
#import <SignalMessaging/OWSFormat.h>
|
||||||
|
#import <SignalMessaging/UIColor+OWS.h>
|
||||||
#import <SignalServiceKit/MimeTypeUtil.h>
|
#import <SignalServiceKit/MimeTypeUtil.h>
|
||||||
#import <SignalServiceKit/TSAttachmentStream.h>
|
#import <SignalServiceKit/TSAttachmentStream.h>
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
|
|
||||||
- (UIColor *)bubbleBackgroundColor
|
- (UIColor *)bubbleBackgroundColor
|
||||||
{
|
{
|
||||||
return self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
return self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (UIColor *)textColor
|
- (UIColor *)textColor
|
||||||
|
|
|
@ -768,11 +768,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
switch (self.attachmentPointer.state) {
|
switch (self.attachmentPointer.state) {
|
||||||
case TSAttachmentPointerStateEnqueued:
|
case TSAttachmentPointerStateEnqueued:
|
||||||
customView.backgroundColor
|
customView.backgroundColor
|
||||||
= (self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_fadedBlueColor]);
|
= (self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_fadedBlueColor]);
|
||||||
break;
|
break;
|
||||||
case TSAttachmentPointerStateDownloading:
|
case TSAttachmentPointerStateDownloading:
|
||||||
customView.backgroundColor
|
customView.backgroundColor
|
||||||
= (self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_fadedBlueColor]);
|
= (self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_fadedBlueColor]);
|
||||||
break;
|
break;
|
||||||
case TSAttachmentPointerStateFailed:
|
case TSAttachmentPointerStateFailed:
|
||||||
customView.backgroundColor = [UIColor grayColor];
|
customView.backgroundColor = [UIColor grayColor];
|
||||||
|
|
|
@ -4,11 +4,9 @@
|
||||||
|
|
||||||
#import "OWSSystemMessageCell.h"
|
#import "OWSSystemMessageCell.h"
|
||||||
#import "ConversationViewItem.h"
|
#import "ConversationViewItem.h"
|
||||||
#import "NSBundle+JSQMessages.h"
|
|
||||||
#import "UIColor+OWS.h"
|
#import "UIColor+OWS.h"
|
||||||
#import "UIFont+OWS.h"
|
#import "UIFont+OWS.h"
|
||||||
#import "UIView+OWS.h"
|
#import "UIView+OWS.h"
|
||||||
#import <JSQMessagesViewController/UIView+JSQMessages.h>
|
|
||||||
#import <SignalMessaging/Environment.h>
|
#import <SignalMessaging/Environment.h>
|
||||||
#import <SignalMessaging/OWSContactsManager.h>
|
#import <SignalMessaging/OWSContactsManager.h>
|
||||||
#import <SignalServiceKit/OWSVerificationStateChangeMessage.h>
|
#import <SignalServiceKit/OWSVerificationStateChangeMessage.h>
|
||||||
|
|
|
@ -4,8 +4,6 @@
|
||||||
|
|
||||||
#import "OWSUnreadIndicatorCell.h"
|
#import "OWSUnreadIndicatorCell.h"
|
||||||
#import "ConversationViewItem.h"
|
#import "ConversationViewItem.h"
|
||||||
#import "NSBundle+JSQMessages.h"
|
|
||||||
#import <JSQMessagesViewController/UIView+JSQMessages.h>
|
|
||||||
#import <SignalMessaging/TSUnreadIndicatorInteraction.h>
|
#import <SignalMessaging/TSUnreadIndicatorInteraction.h>
|
||||||
#import <SignalMessaging/UIColor+OWS.h>
|
#import <SignalMessaging/UIColor+OWS.h>
|
||||||
#import <SignalMessaging/UIFont+OWS.h>
|
#import <SignalMessaging/UIFont+OWS.h>
|
||||||
|
@ -133,7 +131,8 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
@"Messages that indicates that there are more unseen messages including safety number changes that "
|
@"Messages that indicates that there are more unseen messages including safety number changes that "
|
||||||
@"be revealed by tapping the 'load earlier messages' button. Embeds {{the name of the 'load earlier "
|
@"be revealed by tapping the 'load earlier messages' button. Embeds {{the name of the 'load earlier "
|
||||||
@"messages' button}}."));
|
@"messages' button}}."));
|
||||||
NSString *loadMoreButtonName = [NSBundle jsq_localizedStringForKey:@"load_earlier_messages"];
|
NSString *loadMoreButtonName = NSLocalizedString(
|
||||||
|
@"load_earlier_messages", @"Label for button that loads more messages in conversation view.");
|
||||||
return [NSString stringWithFormat:subtitleFormat, loadMoreButtonName];
|
return [NSString stringWithFormat:subtitleFormat, loadMoreButtonName];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,14 +45,6 @@
|
||||||
#import <AVFoundation/AVFoundation.h>
|
#import <AVFoundation/AVFoundation.h>
|
||||||
#import <AssetsLibrary/AssetsLibrary.h>
|
#import <AssetsLibrary/AssetsLibrary.h>
|
||||||
#import <ContactsUI/CNContactViewController.h>
|
#import <ContactsUI/CNContactViewController.h>
|
||||||
#import <JSQMessagesViewController/JSQMessagesBubbleImage.h>
|
|
||||||
#import <JSQMessagesViewController/JSQMessagesBubbleImageFactory.h>
|
|
||||||
#import <JSQMessagesViewController/JSQMessagesCollectionViewFlowLayoutInvalidationContext.h>
|
|
||||||
#import <JSQMessagesViewController/JSQMessagesCollectionViewLayoutAttributes.h>
|
|
||||||
#import <JSQMessagesViewController/JSQMessagesTimestampFormatter.h>
|
|
||||||
#import <JSQMessagesViewController/JSQSystemSoundPlayer+JSQMessages.h>
|
|
||||||
#import <JSQMessagesViewController/UIColor+JSQMessages.h>
|
|
||||||
#import <JSQSystemSoundPlayer/JSQSystemSoundPlayer.h>
|
|
||||||
#import <MobileCoreServices/UTCoreTypes.h>
|
#import <MobileCoreServices/UTCoreTypes.h>
|
||||||
#import <PromiseKit/AnyPromise.h>
|
#import <PromiseKit/AnyPromise.h>
|
||||||
#import <SignalMessaging/Environment.h>
|
#import <SignalMessaging/Environment.h>
|
||||||
|
@ -1479,8 +1471,6 @@ typedef enum : NSUInteger {
|
||||||
[((TSContactThread *)self.thread).contactIdentifier isEqualToString:[TSAccountManager localNumber]]);
|
[((TSContactThread *)self.thread).contactIdentifier isEqualToString:[TSAccountManager localNumber]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#pragma mark - JSQMessagesViewController method overrides
|
|
||||||
|
|
||||||
#pragma mark - Dynamic Text
|
#pragma mark - Dynamic Text
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2702,7 +2692,9 @@ typedef enum : NSUInteger {
|
||||||
self.inputToolbar.quotedReply = nil;
|
self.inputToolbar.quotedReply = nil;
|
||||||
|
|
||||||
if ([Environment.preferences soundInForeground]) {
|
if ([Environment.preferences soundInForeground]) {
|
||||||
[JSQSystemSoundPlayer jsq_playMessageSentSound];
|
SystemSoundID soundId = [OWSSounds systemSoundIDForSound:OWSSound_MessageSent quiet:YES];
|
||||||
|
// Vibrate, respect silent switch, respect "Alert" volume, not media volume.
|
||||||
|
AudioServicesPlayAlertSound(soundId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -522,7 +522,7 @@ public class MediaTileViewController: UICollectionViewController, MediaGalleryDa
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let items: [MediaGalleryItem] = indexPaths.flatMap { return self.galleryItem(at: $0) }
|
let items: [MediaGalleryItem] = indexPaths.compactMap { return self.galleryItem(at: $0) }
|
||||||
|
|
||||||
guard let mediaGalleryDataSource = self.mediaGalleryDataSource else {
|
guard let mediaGalleryDataSource = self.mediaGalleryDataSource else {
|
||||||
owsFail("\(logTag) in \(#function) mediaGalleryDataSource was unexpectedly nil")
|
owsFail("\(logTag) in \(#function) mediaGalleryDataSource was unexpectedly nil")
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class SafetyNumberConfirmationAlert: NSObject {
|
||||||
}
|
}
|
||||||
|
|
||||||
private func untrustedIdentityForSending(recipientIds: [String]) -> OWSRecipientIdentity? {
|
private func untrustedIdentityForSending(recipientIds: [String]) -> OWSRecipientIdentity? {
|
||||||
return recipientIds.flatMap {
|
return recipientIds.compactMap {
|
||||||
OWSIdentityManager.shared().untrustedIdentityForSending(toRecipientId: $0)
|
OWSIdentityManager.shared().untrustedIdentityForSending(toRecipientId: $0)
|
||||||
}.first
|
}.first
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ enum ExperienceUpgradeId: String {
|
||||||
// introducingProfiles,
|
// introducingProfiles,
|
||||||
// introducingReadReceipts,
|
// introducingReadReceipts,
|
||||||
configurableNotificationAudio
|
configurableNotificationAudio
|
||||||
].flatMap { $0 }
|
].compactMap { $0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Instance Methods
|
// MARK: - Instance Methods
|
||||||
|
|
|
@ -368,7 +368,7 @@ extension GiphyError: LocalizedError {
|
||||||
Logger.error("\(TAG) Invalid response data.")
|
Logger.error("\(TAG) Invalid response data.")
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
return imageDicts.flatMap { imageDict in
|
return imageDicts.compactMap { imageDict in
|
||||||
return parseGiphyImage(imageDict: imageDict)
|
return parseGiphyImage(imageDict: imageDict)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,5 @@
|
||||||
//
|
//
|
||||||
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
#import "Signal-Bridging-Header.h"
|
#import "Signal-Bridging-Header.h"
|
||||||
#import <JSQMessagesViewController/JSQMessageData.h>
|
|
||||||
#import <JSQMessagesViewController/JSQMessagesCollectionViewFlowLayout.h>
|
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "لقد ضبطت وقت إخفاء الرسالة على %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "لقد ضبطت وقت إخفاء الرسالة على %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "تحميل الرسائل السابقة";
|
"load_earlier_messages" = "تحميل الرسائل السابقة";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Yox olan ismarışların vaxtını belə quraşdırmısan: %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Yox olan ismarışların vaxtını belə quraşdırmısan: %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Load Earlier Messages";
|
"load_earlier_messages" = "Load Earlier Messages";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Вие настроихте изчезващите съобщения за време от %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Вие настроихте изчезващите съобщения за време от %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Зареждане на по-ранни съобщения";
|
"load_earlier_messages" = "Зареждане на по-ранни съобщения";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Postavili ste vrijeme za nestajuće poruke na %@. ";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Postavili ste vrijeme za nestajuće poruke na %@. ";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Učitaj ranije poruke";
|
"load_earlier_messages" = "Učitaj ranije poruke";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Heu establit el temps dels missatges efímers en %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Heu establit el temps dels missatges efímers en %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Carrega els missatges anteriors";
|
"load_earlier_messages" = "Carrega els missatges anteriors";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Nastavil(a) jste čas mizejících zpráv na %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Nastavil(a) jste čas mizejících zpráv na %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Načíst předchozí zprávy";
|
"load_earlier_messages" = "Načíst předchozí zprávy";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Beskeder sat til at forsvinde efter %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Beskeder sat til at forsvinde efter %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Load Earlier Messages";
|
"load_earlier_messages" = "Load Earlier Messages";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Du hast die Zeit für verschwindende Nachrichten auf %@ festgelegt.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Du hast die Zeit für verschwindende Nachrichten auf %@ festgelegt.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Ältere Nachrichten laden";
|
"load_earlier_messages" = "Ältere Nachrichten laden";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Όρισες τον χρόνο εξαφάνισης μηνυμάτων σε %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Όρισες τον χρόνο εξαφάνισης μηνυμάτων σε %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Φόρτωμα παλαιότερων μηνυμάτων";
|
"load_earlier_messages" = "Φόρτωμα παλαιότερων μηνυμάτων";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Load Earlier Messages";
|
"load_earlier_messages" = "Load Earlier Messages";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Has fijado la caducidad de mensajes a %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Has fijado la caducidad de mensajes a %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Mostrar mensajes previos";
|
"load_earlier_messages" = "Mostrar mensajes previos";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Sa määrasid kaduvate sõnumite aja: %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Sa määrasid kaduvate sõnumite aja: %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Laadi varasemad sõnumid";
|
"load_earlier_messages" = "Laadi varasemad sõnumid";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "شما زمان محوشدن پیامها را به %@ تنظیم کردید.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "شما زمان محوشدن پیامها را به %@ تنظیم کردید.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "نمایش پیام های قدیمی";
|
"load_earlier_messages" = "نمایش پیام های قدیمی";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Sinä asetit viestien katoamisajan: %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Sinä asetit viestien katoamisajan: %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Lataa aiempia viestejä";
|
"load_earlier_messages" = "Lataa aiempia viestejä";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Load Earlier Messages";
|
"load_earlier_messages" = "Load Earlier Messages";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Vous avez défini le délai de disparition des messages à %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Vous avez défini le délai de disparition des messages à %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Charger les messages antérieurs";
|
"load_earlier_messages" = "Charger les messages antérieurs";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Seleccionaches a caducidade do mensaxe a %@";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Seleccionaches a caducidade do mensaxe a %@";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Cargar mensaxes máis recentes";
|
"load_earlier_messages" = "Cargar mensaxes máis recentes";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "הִגְדַּרְתָּ את זמן ההודעות הנעלמות אל %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "הִגְדַּרְתָּ את זמן ההודעות הנעלמות אל %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "טען הודעות מוקדמות יותר";
|
"load_earlier_messages" = "טען הודעות מוקדמות יותר";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Postavili ste vrijeme za nestajuće poruke na %@. ";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Postavili ste vrijeme za nestajuće poruke na %@. ";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Učitaj ranije poruke";
|
"load_earlier_messages" = "Učitaj ranije poruke";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Beállítottad az eltűnő üzenet idejét erre: %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Beállítottad az eltűnő üzenet idejét erre: %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Korábbi üzenetek betöltése";
|
"load_earlier_messages" = "Korábbi üzenetek betöltése";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Anda mengatur pesan tersembunyi pada %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Anda mengatur pesan tersembunyi pada %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Memuat Pesan Sebelumnya";
|
"load_earlier_messages" = "Memuat Pesan Sebelumnya";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Hai impostato la scomparsa dei messaggi a %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Hai impostato la scomparsa dei messaggi a %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Carica messaggi più recenti";
|
"load_earlier_messages" = "Carica messaggi più recenti";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "メッセージの消失時間を%@に設定しました";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "メッセージの消失時間を%@に設定しました";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "以前のメッセージを読み込む";
|
"load_earlier_messages" = "以前のメッセージを読み込む";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "អ្នកកំណត់រយៈពេលសាររលុប %@។";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "អ្នកកំណត់រយៈពេលសាររលុប %@។";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "ផ្ទុកសារពីមុន";
|
"load_earlier_messages" = "ផ្ទុកសារពីមុន";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Load Earlier Messages";
|
"load_earlier_messages" = "Load Earlier Messages";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Jūs nustatėte išnykstančių žinučių laiką į %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Jūs nustatėte išnykstančių žinučių laiką į %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Įkelti ankstesnes žinutes";
|
"load_earlier_messages" = "Įkelti ankstesnes žinutes";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Load Earlier Messages";
|
"load_earlier_messages" = "Load Earlier Messages";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Го подесивте времето на исчезнувањето на пораките на %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Го подесивте времето на исчезнувањето на пораките на %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Load Earlier Messages";
|
"load_earlier_messages" = "Load Earlier Messages";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "သင်သည် စာများအား %@ အတောအတွင်းပျက်သွားစေရန် ချိန်ထားသည်။";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "သင်သည် စာများအား %@ အတောအတွင်းပျက်သွားစေရန် ချိန်ထားသည်။";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "အပေါ်က စာများကို ဖွင့်ပါ";
|
"load_earlier_messages" = "အပေါ်က စာများကို ဖွင့်ပါ";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Du satte tidsbegrensede meldinger til %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Du satte tidsbegrensede meldinger til %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Last inn tidligere meldinger";
|
"load_earlier_messages" = "Last inn tidligere meldinger";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Je hebt de berichtverdwijntijd ingesteld op %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Je hebt de berichtverdwijntijd ingesteld op %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Vorige berichten laden";
|
"load_earlier_messages" = "Vorige berichten laden";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Ustawiłeś czas znikających wiadomości na %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Ustawiłeś czas znikających wiadomości na %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Załaduj wcześniejsze wiadomości";
|
"load_earlier_messages" = "Załaduj wcześniejsze wiadomości";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Você definiu a expiração de mensagens efêmeras para %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Você definiu a expiração de mensagens efêmeras para %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Carregar Mensagens Precedentes";
|
"load_earlier_messages" = "Carregar Mensagens Precedentes";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Definiu o tempo para a destruição de mensagens para %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Definiu o tempo para a destruição de mensagens para %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Carregar Mensagens Antigas";
|
"load_earlier_messages" = "Carregar Mensagens Antigas";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Ai setat timpul de expirare a mesajelor la %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Ai setat timpul de expirare a mesajelor la %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Încarcă mesajele anterioare";
|
"load_earlier_messages" = "Încarcă mesajele anterioare";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Вы установили время исчезновения сообщений — %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Вы установили время исчезновения сообщений — %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Загрузить более ранние сообщения";
|
"load_earlier_messages" = "Загрузить более ранние сообщения";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Čas za izginjajoča sporočila ste nastavili na %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Čas za izginjajoča sporočila ste nastavili na %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Prikaži prejšnja sporočila";
|
"load_earlier_messages" = "Prikaži prejšnja sporočila";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Waita kuti tsamba dzinonyangadika ive 1%@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Waita kuti tsamba dzinonyangadika ive 1%@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Tora tsamba dzakare";
|
"load_earlier_messages" = "Tora tsamba dzakare";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Ju rregulluat kohën për zhdukjen e mesazheve në %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Ju rregulluat kohën për zhdukjen e mesazheve në %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Load Earlier Messages";
|
"load_earlier_messages" = "Load Earlier Messages";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Du satte tid innan meddelanden försvinner till %@.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Du satte tid innan meddelanden försvinner till %@.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Ladda tidigare meddelanden";
|
"load_earlier_messages" = "Ladda tidigare meddelanden";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "คุณได้ตั้งเวลาข้อความลบตัวเองไว้ที่ %@";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "คุณได้ตั้งเวลาข้อความลบตัวเองไว้ที่ %@";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "โหลดข้อความก่อนหน้านี้";
|
"load_earlier_messages" = "โหลดข้อความก่อนหน้านี้";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Kaybolan mesaj süresini %@ olarak ayarladın.";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Kaybolan mesaj süresini %@ olarak ayarladın.";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "Önceki Mesajları Yükle";
|
"load_earlier_messages" = "Önceki Mesajları Yükle";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "您设置了消息%@后消失。";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "您设置了消息%@后消失。";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "加载早前的消息";
|
"load_earlier_messages" = "加载早前的消息";
|
||||||
|
|
|
@ -2257,7 +2257,7 @@
|
||||||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "訊息銷毀時間設置為%@。";
|
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "訊息銷毀時間設置為%@。";
|
||||||
|
|
||||||
// Strings Copied in from JSQMessagesViewController
|
|
||||||
|
|
||||||
|
|
||||||
"load_earlier_messages" = "讀取較早訊息";
|
"load_earlier_messages" = "讀取較早訊息";
|
||||||
|
|
|
@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
@property (class, readonly, nonatomic) UIColor *ows_errorMessageBorderColor;
|
@property (class, readonly, nonatomic) UIColor *ows_errorMessageBorderColor;
|
||||||
@property (class, readonly, nonatomic) UIColor *ows_infoMessageBorderColor;
|
@property (class, readonly, nonatomic) UIColor *ows_infoMessageBorderColor;
|
||||||
@property (class, readonly, nonatomic) UIColor *ows_toolbarBackgroundColor;
|
@property (class, readonly, nonatomic) UIColor *ows_toolbarBackgroundColor;
|
||||||
|
@property (class, readonly, nonatomic) UIColor *ows_messageBubbleLightGrayColor;
|
||||||
|
|
||||||
+ (UIColor *)backgroundColorForContact:(NSString *)contactIdentifier;
|
+ (UIColor *)backgroundColorForContact:(NSString *)contactIdentifier;
|
||||||
+ (UIColor *)colorWithRGBHex:(unsigned long)value;
|
+ (UIColor *)colorWithRGBHex:(unsigned long)value;
|
||||||
|
|
|
@ -111,6 +111,11 @@ NS_ASSUME_NONNULL_BEGIN
|
||||||
return sharedColor;
|
return sharedColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
+ (UIColor *)ows_messageBubbleLightGrayColor
|
||||||
|
{
|
||||||
|
return [UIColor colorWithHue:240.0f / 360.0f saturation:0.02f brightness:0.92f alpha:1.0f];
|
||||||
|
}
|
||||||
|
|
||||||
+ (UIColor *)backgroundColorForContact:(NSString *)contactIdentifier
|
+ (UIColor *)backgroundColorForContact:(NSString *)contactIdentifier
|
||||||
{
|
{
|
||||||
NSArray *colors = @[
|
NSArray *colors = @[
|
||||||
|
|
|
@ -128,7 +128,7 @@ public class OWSAudioSession: NSObject {
|
||||||
defer { objc_sync_exit(self) }
|
defer { objc_sync_exit(self) }
|
||||||
|
|
||||||
// Cull any stale activities
|
// Cull any stale activities
|
||||||
currentActivities = currentActivities.flatMap { oldActivity in
|
currentActivities = currentActivities.compactMap { oldActivity in
|
||||||
guard oldActivity.value != nil else {
|
guard oldActivity.value != nil else {
|
||||||
// Normally we should be explicitly stopping an audio activity, but this allows
|
// Normally we should be explicitly stopping an audio activity, but this allows
|
||||||
// for recovery if the owner of the AudioAcivity was GC'd without ending it's
|
// for recovery if the owner of the AudioAcivity was GC'd without ending it's
|
||||||
|
|
|
@ -34,6 +34,7 @@ typedef NS_ENUM(NSUInteger, OWSSound) {
|
||||||
OWSSound_CallFailure,
|
OWSSound_CallFailure,
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
|
OWSSound_MessageSent,
|
||||||
OWSSound_None,
|
OWSSound_None,
|
||||||
OWSSound_DefaultiOSIncomingRingtone = OWSSound_Opening,
|
OWSSound_DefaultiOSIncomingRingtone = OWSSound_Opening,
|
||||||
};
|
};
|
||||||
|
|
|
@ -172,6 +172,8 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
||||||
return @"Call Busy";
|
return @"Call Busy";
|
||||||
case OWSSound_CallFailure:
|
case OWSSound_CallFailure:
|
||||||
return @"Call Failure";
|
return @"Call Failure";
|
||||||
|
case OWSSound_MessageSent:
|
||||||
|
return @"Message Sent";
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
case OWSSound_None:
|
case OWSSound_None:
|
||||||
|
@ -234,6 +236,8 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
||||||
return @"busy_tone_ansi.caf";
|
return @"busy_tone_ansi.caf";
|
||||||
case OWSSound_CallFailure:
|
case OWSSound_CallFailure:
|
||||||
return @"end_call_tone_cept.caf";
|
return @"end_call_tone_cept.caf";
|
||||||
|
case OWSSound_MessageSent:
|
||||||
|
return @"message_sent.aiff";
|
||||||
|
|
||||||
// Other
|
// Other
|
||||||
case OWSSound_None:
|
case OWSSound_None:
|
||||||
|
|
|
@ -3,7 +3,6 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
import JSQMessagesViewController
|
|
||||||
import SignalServiceKit
|
import SignalServiceKit
|
||||||
|
|
||||||
@objc
|
@objc
|
||||||
|
@ -12,8 +11,6 @@ public class OWSMessagesBubbleImageFactory: NSObject {
|
||||||
@objc
|
@objc
|
||||||
public static let shared = OWSMessagesBubbleImageFactory()
|
public static let shared = OWSMessagesBubbleImageFactory()
|
||||||
|
|
||||||
private let jsqFactory = JSQMessagesBubbleImageFactory()!
|
|
||||||
|
|
||||||
// TODO: UIView is a little bit expensive to instantiate.
|
// TODO: UIView is a little bit expensive to instantiate.
|
||||||
// Can we cache this value?
|
// Can we cache this value?
|
||||||
private lazy var isRTL: Bool = {
|
private lazy var isRTL: Bool = {
|
||||||
|
@ -21,50 +18,7 @@ public class OWSMessagesBubbleImageFactory: NSObject {
|
||||||
}()
|
}()
|
||||||
|
|
||||||
@objc
|
@objc
|
||||||
public lazy var incoming: JSQMessagesBubbleImage = {
|
public static let bubbleColorIncoming = UIColor.ows_messageBubbleLightGray
|
||||||
let color = OWSMessagesBubbleImageFactory.bubbleColorIncoming
|
|
||||||
return self.incoming(color: color)
|
|
||||||
}()
|
|
||||||
|
|
||||||
@objc
|
|
||||||
public lazy var outgoing: JSQMessagesBubbleImage = {
|
|
||||||
let color = OWSMessagesBubbleImageFactory.bubbleColorOutgoingSent
|
|
||||||
return self.outgoing(color: color)
|
|
||||||
}()
|
|
||||||
|
|
||||||
@objc
|
|
||||||
public lazy var currentlyOutgoing: JSQMessagesBubbleImage = {
|
|
||||||
let color = OWSMessagesBubbleImageFactory.bubbleColorOutgoingSending
|
|
||||||
return self.outgoing(color: color)
|
|
||||||
}()
|
|
||||||
|
|
||||||
@objc
|
|
||||||
public lazy var outgoingFailed: JSQMessagesBubbleImage = {
|
|
||||||
let color = OWSMessagesBubbleImageFactory.bubbleColorOutgoingUnsent
|
|
||||||
return self.outgoing(color: color)
|
|
||||||
}()
|
|
||||||
|
|
||||||
@objc
|
|
||||||
public func bubble(message: TSMessage) -> JSQMessagesBubbleImage {
|
|
||||||
if message is TSIncomingMessage {
|
|
||||||
return self.incoming
|
|
||||||
} else if let outgoingMessage = message as? TSOutgoingMessage {
|
|
||||||
switch outgoingMessage.messageState {
|
|
||||||
case .failed:
|
|
||||||
return outgoingFailed
|
|
||||||
case .sending:
|
|
||||||
return currentlyOutgoing
|
|
||||||
default:
|
|
||||||
return outgoing
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
owsFail("Unexpected message type: \(message)")
|
|
||||||
return outgoing
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc
|
|
||||||
public static let bubbleColorIncoming = UIColor.jsq_messageBubbleLightGray()!
|
|
||||||
|
|
||||||
@objc
|
@objc
|
||||||
public static let bubbleColorOutgoingUnsent = UIColor.gray
|
public static let bubbleColorOutgoingUnsent = UIColor.gray
|
||||||
|
@ -93,20 +47,4 @@ public class OWSMessagesBubbleImageFactory: NSObject {
|
||||||
return UIColor.ows_materialBlue
|
return UIColor.ows_materialBlue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private func outgoing(color: UIColor) -> JSQMessagesBubbleImage {
|
|
||||||
if isRTL {
|
|
||||||
return jsqFactory.incomingMessagesBubbleImage(with: color)
|
|
||||||
} else {
|
|
||||||
return jsqFactory.outgoingMessagesBubbleImage(with: color)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private func incoming(color: UIColor) -> JSQMessagesBubbleImage {
|
|
||||||
if isRTL {
|
|
||||||
return jsqFactory.outgoingMessagesBubbleImage(with: color)
|
|
||||||
} else {
|
|
||||||
return jsqFactory.incomingMessagesBubbleImage(with: color)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue