mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Reduce usage of JSQ.
This commit is contained in:
parent
d3ea8582b6
commit
3964b78ff7
67 changed files with 82 additions and 150 deletions
|
@ -148,6 +148,7 @@
|
|||
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, ); }; };
|
||||
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 */; };
|
||||
347850311FD7494A007B8332 /* dripicons-v2.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 34330A5B1E787A9800DF2FB9 /* dripicons-v2.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; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
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>"; };
|
||||
|
@ -1279,6 +1281,7 @@
|
|||
isa = PBXGroup;
|
||||
children = (
|
||||
45A2F004204473A3002E978A /* NewMessage.aifc */,
|
||||
34661FB720C1C0D60056EDD6 /* message_sent.aiff */,
|
||||
34CF0783203E6B77005C4D61 /* busy_tone_ansi.caf */,
|
||||
34CF0786203E6B78005C4D61 /* end_call_tone_cept.caf */,
|
||||
34074FC5203E5435004596AE /* messageReceivedSounds */,
|
||||
|
@ -2747,6 +2750,7 @@
|
|||
34CF0788203E6B78005C4D61 /* ringback_tone_ansi.caf in Resources */,
|
||||
34C3C78F2040A4F70000134C /* sonarping.mp3 in Resources */,
|
||||
AD83FF431A73426500B5C81A /* audio_play_button@2x.png in Resources */,
|
||||
34661FB820C1C0D60056EDD6 /* message_sent.aiff in Resources */,
|
||||
45CB2FA81CB7146C00E1B343 /* Launch Screen.storyboard in Resources */,
|
||||
34B3F8781E8DF1700035BE1A /* ContactsPicker.xib in Resources */,
|
||||
B633C5C31A1D190B0059AC12 /* mute_off@2x.png in Resources */,
|
||||
|
|
BIN
Signal/AudioFiles/message_sent.aiff
Normal file
BIN
Signal/AudioFiles/message_sent.aiff
Normal file
Binary file not shown.
|
@ -52,9 +52,9 @@ public class AccountManager: NSObject {
|
|||
|
||||
Logger.debug("\(self.TAG) registering with signal server")
|
||||
let registrationPromise: Promise<Void> = firstly {
|
||||
self.registerForTextSecure(verificationCode: verificationCode, pin: pin)
|
||||
return self.registerForTextSecure(verificationCode: verificationCode, pin: pin)
|
||||
}.then {
|
||||
self.syncPushTokens()
|
||||
return self.syncPushTokens()
|
||||
}.recover { (error) -> Promise<Void> in
|
||||
switch error {
|
||||
case PushRegistrationError.pushNotSupported(let description):
|
||||
|
|
|
@ -41,12 +41,6 @@
|
|||
#import "UIViewController+Permissions.h"
|
||||
#import "ViewControllerUtils.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 <Reachability/Reachability.h>
|
||||
#import <SignalMessaging/AttachmentSharing.h>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
#import "OWSAudioMessageView.h"
|
||||
#import "ConversationViewItem.h"
|
||||
#import "Signal-Swift.h"
|
||||
#import "UIColor+JSQMessages.h"
|
||||
#import "UIColor+OWS.h"
|
||||
#import "ViewControllerUtils.h"
|
||||
#import <SignalMessaging/OWSFormat.h>
|
||||
#import <SignalMessaging/UIColor+OWS.h>
|
||||
#import <SignalServiceKit/MIMETypeUtil.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
@ -179,7 +179,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (UIColor *)bubbleBackgroundColor
|
||||
{
|
||||
return self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
||||
return self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
||||
}
|
||||
|
||||
- (BOOL)isVoiceMessage
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
#import "OWSContactOffersCell.h"
|
||||
#import "ConversationViewItem.h"
|
||||
#import "NSBundle+JSQMessages.h"
|
||||
#import <JSQMessagesViewController/UIView+JSQMessages.h>
|
||||
#import <SignalMessaging/OWSContactOffersInteraction.h>
|
||||
#import <SignalMessaging/UIColor+OWS.h>
|
||||
#import <SignalMessaging/UIFont+OWS.h>
|
||||
|
@ -139,7 +137,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
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
|
||||
// want to reverse.
|
||||
CGFloat contentWidth = self.width;
|
||||
|
|
|
@ -5,12 +5,12 @@
|
|||
#import "OWSContactShareView.h"
|
||||
#import "OWSContactAvatarBuilder.h"
|
||||
#import "Signal-Swift.h"
|
||||
#import "UIColor+JSQMessages.h"
|
||||
#import "UIColor+OWS.h"
|
||||
#import "UIFont+OWS.h"
|
||||
#import "UIView+OWS.h"
|
||||
#import <SignalMessaging/Environment.h>
|
||||
#import <SignalMessaging/SignalMessaging-Swift.h>
|
||||
#import <SignalMessaging/UIColor+OWS.h>
|
||||
#import <SignalServiceKit/OWSContact.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
@ -145,7 +145,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (UIColor *)bubbleBackgroundColor
|
||||
{
|
||||
return self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
||||
return self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
||||
}
|
||||
|
||||
+ (UIFont *)nameFont
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
#import "OWSGenericAttachmentView.h"
|
||||
#import "OWSBezierPathView.h"
|
||||
#import "UIColor+JSQMessages.h"
|
||||
#import "UIColor+OWS.h"
|
||||
#import "UIFont+OWS.h"
|
||||
#import "UIView+OWS.h"
|
||||
#import "ViewControllerUtils.h"
|
||||
#import <SignalMessaging/NSString+OWS.h>
|
||||
#import <SignalMessaging/OWSFormat.h>
|
||||
#import <SignalMessaging/UIColor+OWS.h>
|
||||
#import <SignalServiceKit/MimeTypeUtil.h>
|
||||
#import <SignalServiceKit/TSAttachmentStream.h>
|
||||
|
||||
|
@ -88,7 +88,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
|
||||
- (UIColor *)bubbleBackgroundColor
|
||||
{
|
||||
return self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
||||
return self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_materialBlueColor];
|
||||
}
|
||||
|
||||
- (UIColor *)textColor
|
||||
|
|
|
@ -768,11 +768,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
switch (self.attachmentPointer.state) {
|
||||
case TSAttachmentPointerStateEnqueued:
|
||||
customView.backgroundColor
|
||||
= (self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_fadedBlueColor]);
|
||||
= (self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_fadedBlueColor]);
|
||||
break;
|
||||
case TSAttachmentPointerStateDownloading:
|
||||
customView.backgroundColor
|
||||
= (self.isIncoming ? [UIColor jsq_messageBubbleLightGrayColor] : [UIColor ows_fadedBlueColor]);
|
||||
= (self.isIncoming ? [UIColor ows_messageBubbleLightGrayColor] : [UIColor ows_fadedBlueColor]);
|
||||
break;
|
||||
case TSAttachmentPointerStateFailed:
|
||||
customView.backgroundColor = [UIColor grayColor];
|
||||
|
|
|
@ -4,11 +4,9 @@
|
|||
|
||||
#import "OWSSystemMessageCell.h"
|
||||
#import "ConversationViewItem.h"
|
||||
#import "NSBundle+JSQMessages.h"
|
||||
#import "UIColor+OWS.h"
|
||||
#import "UIFont+OWS.h"
|
||||
#import "UIView+OWS.h"
|
||||
#import <JSQMessagesViewController/UIView+JSQMessages.h>
|
||||
#import <SignalMessaging/Environment.h>
|
||||
#import <SignalMessaging/OWSContactsManager.h>
|
||||
#import <SignalServiceKit/OWSVerificationStateChangeMessage.h>
|
||||
|
|
|
@ -4,8 +4,6 @@
|
|||
|
||||
#import "OWSUnreadIndicatorCell.h"
|
||||
#import "ConversationViewItem.h"
|
||||
#import "NSBundle+JSQMessages.h"
|
||||
#import <JSQMessagesViewController/UIView+JSQMessages.h>
|
||||
#import <SignalMessaging/TSUnreadIndicatorInteraction.h>
|
||||
#import <SignalMessaging/UIColor+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 "
|
||||
@"be revealed by tapping the 'load earlier messages' button. Embeds {{the name of the 'load earlier "
|
||||
@"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];
|
||||
}
|
||||
|
||||
|
|
|
@ -45,14 +45,6 @@
|
|||
#import <AVFoundation/AVFoundation.h>
|
||||
#import <AssetsLibrary/AssetsLibrary.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 <PromiseKit/AnyPromise.h>
|
||||
#import <SignalMessaging/Environment.h>
|
||||
|
@ -1479,8 +1471,6 @@ typedef enum : NSUInteger {
|
|||
[((TSContactThread *)self.thread).contactIdentifier isEqualToString:[TSAccountManager localNumber]]);
|
||||
}
|
||||
|
||||
#pragma mark - JSQMessagesViewController method overrides
|
||||
|
||||
#pragma mark - Dynamic Text
|
||||
|
||||
/**
|
||||
|
@ -2702,7 +2692,9 @@ typedef enum : NSUInteger {
|
|||
self.inputToolbar.quotedReply = nil;
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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 {
|
||||
owsFail("\(logTag) in \(#function) mediaGalleryDataSource was unexpectedly nil")
|
||||
|
|
|
@ -112,7 +112,7 @@ public class SafetyNumberConfirmationAlert: NSObject {
|
|||
}
|
||||
|
||||
private func untrustedIdentityForSending(recipientIds: [String]) -> OWSRecipientIdentity? {
|
||||
return recipientIds.flatMap {
|
||||
return recipientIds.compactMap {
|
||||
OWSIdentityManager.shared().untrustedIdentityForSending(toRecipientId: $0)
|
||||
}.first
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ enum ExperienceUpgradeId: String {
|
|||
// introducingProfiles,
|
||||
// introducingReadReceipts,
|
||||
configurableNotificationAudio
|
||||
].flatMap { $0 }
|
||||
].compactMap { $0 }
|
||||
}
|
||||
|
||||
// MARK: - Instance Methods
|
||||
|
|
|
@ -368,7 +368,7 @@ extension GiphyError: LocalizedError {
|
|||
Logger.error("\(TAG) Invalid response data.")
|
||||
return nil
|
||||
}
|
||||
return imageDicts.flatMap { imageDict in
|
||||
return imageDicts.compactMap { imageDict in
|
||||
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 <JSQMessagesViewController/JSQMessageData.h>
|
||||
#import <JSQMessagesViewController/JSQMessagesCollectionViewFlowLayout.h>
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "لقد ضبطت وقت إخفاء الرسالة على %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "تحميل الرسائل السابقة";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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: %@.";
|
||||
|
||||
// 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. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Вие настроихте изчезващите съобщения за време от %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Зареждане на по-ранни съобщения";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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 %@. ";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Učitaj ranije poruke";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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 %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Carrega els missatges anteriors";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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 %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"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. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Beskeder sat til at forsvinde efter %@.";
|
||||
|
||||
// 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. */
|
||||
"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";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Όρισες τον χρόνο εξαφάνισης μηνυμάτων σε %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Φόρτωμα παλαιότερων μηνυμάτων";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
||||
|
||||
// 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. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Has fijado la caducidad de mensajes a %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Mostrar mensajes previos";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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: %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Laadi varasemad sõnumid";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "شما زمان محوشدن پیامها را به %@ تنظیم کردید.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "نمایش پیام های قدیمی";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Sinä asetit viestien katoamisajan: %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Lataa aiempia viestejä";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
||||
|
||||
// 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. */
|
||||
"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";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Seleccionaches a caducidade do mensaxe a %@";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"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. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "הִגְדַּרְתָּ את זמן ההודעות הנעלמות אל %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "טען הודעות מוקדמות יותר";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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 %@. ";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Učitaj ranije poruke";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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: %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"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. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Anda mengatur pesan tersembunyi pada %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Memuat Pesan Sebelumnya";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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 %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Carica messaggi più recenti";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "メッセージの消失時間を%@に設定しました";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "以前のメッセージを読み込む";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "អ្នកកំណត់រយៈពេលសាររលុប %@។";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "ផ្ទុកសារពីមុន";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
||||
|
||||
// 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. */
|
||||
"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";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "You set disappearing message time to %@.";
|
||||
|
||||
// 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. */
|
||||
"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. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "သင်သည် စာများအား %@ အတောအတွင်းပျက်သွားစေရန် ချိန်ထားသည်။";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "အပေါ်က စာများကို ဖွင့်ပါ";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Du satte tidsbegrensede meldinger til %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Last inn tidligere meldinger";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Je hebt de berichtverdwijntijd ingesteld op %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Vorige berichten laden";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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 %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"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. */
|
||||
"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";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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 %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Carregar Mensagens Antigas";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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 %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Încarcă mesajele anterioare";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Вы установили время исчезновения сообщений — %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Загрузить более ранние сообщения";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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 %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"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. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Waita kuti tsamba dzinonyangadika ive 1%@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Tora tsamba dzakare";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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ë %@.";
|
||||
|
||||
// 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. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "Du satte tid innan meddelanden försvinner till %@.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Ladda tidigare meddelanden";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "คุณได้ตั้งเวลาข้อความลบตัวเองไว้ที่ %@";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "โหลดข้อความก่อนหน้านี้";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* 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.";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "Önceki Mesajları Yükle";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "您设置了消息%@后消失。";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "加载早前的消息";
|
||||
|
|
|
@ -2257,7 +2257,7 @@
|
|||
/* Info message embedding a {{time amount}}, see the *_TIME_AMOUNT strings for context. */
|
||||
"YOU_UPDATED_DISAPPEARING_MESSAGES_CONFIGURATION" = "訊息銷毀時間設置為%@。";
|
||||
|
||||
// Strings Copied in from JSQMessagesViewController
|
||||
|
||||
|
||||
|
||||
"load_earlier_messages" = "讀取較早訊息";
|
||||
|
|
|
@ -25,6 +25,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
@property (class, readonly, nonatomic) UIColor *ows_errorMessageBorderColor;
|
||||
@property (class, readonly, nonatomic) UIColor *ows_infoMessageBorderColor;
|
||||
@property (class, readonly, nonatomic) UIColor *ows_toolbarBackgroundColor;
|
||||
@property (class, readonly, nonatomic) UIColor *ows_messageBubbleLightGrayColor;
|
||||
|
||||
+ (UIColor *)backgroundColorForContact:(NSString *)contactIdentifier;
|
||||
+ (UIColor *)colorWithRGBHex:(unsigned long)value;
|
||||
|
|
|
@ -111,6 +111,11 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
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
|
||||
{
|
||||
NSArray *colors = @[
|
||||
|
|
|
@ -128,7 +128,7 @@ public class OWSAudioSession: NSObject {
|
|||
defer { objc_sync_exit(self) }
|
||||
|
||||
// Cull any stale activities
|
||||
currentActivities = currentActivities.flatMap { oldActivity in
|
||||
currentActivities = currentActivities.compactMap { oldActivity in
|
||||
guard oldActivity.value != nil else {
|
||||
// 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
|
||||
|
|
|
@ -34,6 +34,7 @@ typedef NS_ENUM(NSUInteger, OWSSound) {
|
|||
OWSSound_CallFailure,
|
||||
|
||||
// Other
|
||||
OWSSound_MessageSent,
|
||||
OWSSound_None,
|
||||
OWSSound_DefaultiOSIncomingRingtone = OWSSound_Opening,
|
||||
};
|
||||
|
|
|
@ -172,6 +172,8 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
|||
return @"Call Busy";
|
||||
case OWSSound_CallFailure:
|
||||
return @"Call Failure";
|
||||
case OWSSound_MessageSent:
|
||||
return @"Message Sent";
|
||||
|
||||
// Other
|
||||
case OWSSound_None:
|
||||
|
@ -234,6 +236,8 @@ NSString *const kOWSSoundsStorageGlobalNotificationKey = @"kOWSSoundsStorageGlob
|
|||
return @"busy_tone_ansi.caf";
|
||||
case OWSSound_CallFailure:
|
||||
return @"end_call_tone_cept.caf";
|
||||
case OWSSound_MessageSent:
|
||||
return @"message_sent.aiff";
|
||||
|
||||
// Other
|
||||
case OWSSound_None:
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
//
|
||||
|
||||
import Foundation
|
||||
import JSQMessagesViewController
|
||||
import SignalServiceKit
|
||||
|
||||
@objc
|
||||
|
@ -12,8 +11,6 @@ public class OWSMessagesBubbleImageFactory: NSObject {
|
|||
@objc
|
||||
public static let shared = OWSMessagesBubbleImageFactory()
|
||||
|
||||
private let jsqFactory = JSQMessagesBubbleImageFactory()!
|
||||
|
||||
// TODO: UIView is a little bit expensive to instantiate.
|
||||
// Can we cache this value?
|
||||
private lazy var isRTL: Bool = {
|
||||
|
@ -21,50 +18,7 @@ public class OWSMessagesBubbleImageFactory: NSObject {
|
|||
}()
|
||||
|
||||
@objc
|
||||
public lazy var incoming: JSQMessagesBubbleImage = {
|
||||
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()!
|
||||
public static let bubbleColorIncoming = UIColor.ows_messageBubbleLightGray
|
||||
|
||||
@objc
|
||||
public static let bubbleColorOutgoingUnsent = UIColor.gray
|
||||
|
@ -93,20 +47,4 @@ public class OWSMessagesBubbleImageFactory: NSObject {
|
|||
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 a new issue