diff --git a/Signal.xcodeproj/project.pbxproj b/Signal.xcodeproj/project.pbxproj index 05e290b52..52032e7b3 100644 --- a/Signal.xcodeproj/project.pbxproj +++ b/Signal.xcodeproj/project.pbxproj @@ -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 = ""; }; 34641E1E2088DA6D00E2EDE5 /* SAEScreenLockViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SAEScreenLockViewController.m; sourceTree = ""; }; + 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 = ""; }; 347850561FD86544007B8332 /* SAEFailedViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SAEFailedViewController.swift; sourceTree = ""; }; 347850581FD9972E007B8332 /* SwiftSingletons.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftSingletons.swift; sourceTree = ""; }; @@ -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 */, diff --git a/Signal/AudioFiles/message_sent.aiff b/Signal/AudioFiles/message_sent.aiff new file mode 100644 index 000000000..e46adff5e Binary files /dev/null and b/Signal/AudioFiles/message_sent.aiff differ diff --git a/Signal/src/Models/AccountManager.swift b/Signal/src/Models/AccountManager.swift index fb46966d1..a6a17f06d 100644 --- a/Signal/src/Models/AccountManager.swift +++ b/Signal/src/Models/AccountManager.swift @@ -52,9 +52,9 @@ public class AccountManager: NSObject { Logger.debug("\(self.TAG) registering with signal server") let registrationPromise: Promise = firstly { - self.registerForTextSecure(verificationCode: verificationCode, pin: pin) + return self.registerForTextSecure(verificationCode: verificationCode, pin: pin) }.then { - self.syncPushTokens() + return self.syncPushTokens() }.recover { (error) -> Promise in switch error { case PushRegistrationError.pushNotSupported(let description): diff --git a/Signal/src/Signal-Bridging-Header.h b/Signal/src/Signal-Bridging-Header.h index e8a428a91..df9d0ad23 100644 --- a/Signal/src/Signal-Bridging-Header.h +++ b/Signal/src/Signal-Bridging-Header.h @@ -41,12 +41,6 @@ #import "UIViewController+Permissions.h" #import "ViewControllerUtils.h" #import -#import -#import -#import -#import -#import -#import #import #import #import diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSAudioMessageView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSAudioMessageView.m index 85299986d..98a9403af 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSAudioMessageView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSAudioMessageView.m @@ -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 +#import #import 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 diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSContactOffersCell.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSContactOffersCell.m index 6402fbbf6..89af63251 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSContactOffersCell.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSContactOffersCell.m @@ -4,8 +4,6 @@ #import "OWSContactOffersCell.h" #import "ConversationViewItem.h" -#import "NSBundle+JSQMessages.h" -#import #import #import #import @@ -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; diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSContactShareView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSContactShareView.m index 6b23a2ec7..1a60642fa 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSContactShareView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSContactShareView.m @@ -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 #import +#import #import 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 diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSGenericAttachmentView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSGenericAttachmentView.m index 29c88ac4c..8778028ee 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSGenericAttachmentView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSGenericAttachmentView.m @@ -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 #import +#import #import #import @@ -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 diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m index 2a33bac77..587598c35 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSMessageBubbleView.m @@ -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]; diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSSystemMessageCell.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSSystemMessageCell.m index eb8ad7526..2a3e4e9f0 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSSystemMessageCell.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSSystemMessageCell.m @@ -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 #import #import #import diff --git a/Signal/src/ViewControllers/ConversationView/Cells/OWSUnreadIndicatorCell.m b/Signal/src/ViewControllers/ConversationView/Cells/OWSUnreadIndicatorCell.m index ffa23218c..780147697 100644 --- a/Signal/src/ViewControllers/ConversationView/Cells/OWSUnreadIndicatorCell.m +++ b/Signal/src/ViewControllers/ConversationView/Cells/OWSUnreadIndicatorCell.m @@ -4,8 +4,6 @@ #import "OWSUnreadIndicatorCell.h" #import "ConversationViewItem.h" -#import "NSBundle+JSQMessages.h" -#import #import #import #import @@ -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]; } diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index 982756545..33de8ea9c 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -45,14 +45,6 @@ #import #import #import -#import -#import -#import -#import -#import -#import -#import -#import #import #import #import @@ -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); } } diff --git a/Signal/src/ViewControllers/MediaTileViewController.swift b/Signal/src/ViewControllers/MediaTileViewController.swift index f6a5ecf02..2f5d03f67 100644 --- a/Signal/src/ViewControllers/MediaTileViewController.swift +++ b/Signal/src/ViewControllers/MediaTileViewController.swift @@ -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") diff --git a/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift b/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift index 8964ddf24..cd514edd1 100644 --- a/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift +++ b/Signal/src/ViewControllers/SafetyNumberConfirmationAlert.swift @@ -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 } diff --git a/Signal/src/environment/ExperienceUpgrades/ExperienceUpgradeFinder.swift b/Signal/src/environment/ExperienceUpgrades/ExperienceUpgradeFinder.swift index d6e8fcbb9..cf132252f 100644 --- a/Signal/src/environment/ExperienceUpgrades/ExperienceUpgradeFinder.swift +++ b/Signal/src/environment/ExperienceUpgrades/ExperienceUpgradeFinder.swift @@ -74,7 +74,7 @@ enum ExperienceUpgradeId: String { // introducingProfiles, // introducingReadReceipts, configurableNotificationAudio - ].flatMap { $0 } + ].compactMap { $0 } } // MARK: - Instance Methods diff --git a/Signal/src/network/GiphyAPI.swift b/Signal/src/network/GiphyAPI.swift index 97f68382a..38f8ab394 100644 --- a/Signal/src/network/GiphyAPI.swift +++ b/Signal/src/network/GiphyAPI.swift @@ -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) } } diff --git a/Signal/test/SignalTests-Bridging-Header.h b/Signal/test/SignalTests-Bridging-Header.h index 2fbb2d90d..05752f2d5 100644 --- a/Signal/test/SignalTests-Bridging-Header.h +++ b/Signal/test/SignalTests-Bridging-Header.h @@ -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 -#import diff --git a/Signal/translations/ar.lproj/Localizable.strings b/Signal/translations/ar.lproj/Localizable.strings index e003975db..c55e4af2f 100644 --- a/Signal/translations/ar.lproj/Localizable.strings +++ b/Signal/translations/ar.lproj/Localizable.strings @@ -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" = "تحميل الرسائل السابقة"; diff --git a/Signal/translations/az_AZ.lproj/Localizable.strings b/Signal/translations/az_AZ.lproj/Localizable.strings index b2920a669..65393fb06 100644 --- a/Signal/translations/az_AZ.lproj/Localizable.strings +++ b/Signal/translations/az_AZ.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/bg.lproj/Localizable.strings b/Signal/translations/bg.lproj/Localizable.strings index d7dd2e0b5..5136400d4 100644 --- a/Signal/translations/bg.lproj/Localizable.strings +++ b/Signal/translations/bg.lproj/Localizable.strings @@ -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" = "Зареждане на по-ранни съобщения"; diff --git a/Signal/translations/bs.lproj/Localizable.strings b/Signal/translations/bs.lproj/Localizable.strings index 6d9efd67c..8e6b337a8 100644 --- a/Signal/translations/bs.lproj/Localizable.strings +++ b/Signal/translations/bs.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/ca.lproj/Localizable.strings b/Signal/translations/ca.lproj/Localizable.strings index b90358c5c..3f15d1791 100644 --- a/Signal/translations/ca.lproj/Localizable.strings +++ b/Signal/translations/ca.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/cs.lproj/Localizable.strings b/Signal/translations/cs.lproj/Localizable.strings index 00abd0fc0..f18d4b9f7 100644 --- a/Signal/translations/cs.lproj/Localizable.strings +++ b/Signal/translations/cs.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/da.lproj/Localizable.strings b/Signal/translations/da.lproj/Localizable.strings index 534c6e05e..1d49d31f4 100644 --- a/Signal/translations/da.lproj/Localizable.strings +++ b/Signal/translations/da.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/de.lproj/Localizable.strings b/Signal/translations/de.lproj/Localizable.strings index 15ae321e5..93ffab4c7 100644 --- a/Signal/translations/de.lproj/Localizable.strings +++ b/Signal/translations/de.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/el_GR.lproj/Localizable.strings b/Signal/translations/el_GR.lproj/Localizable.strings index 272b22527..0b31a5798 100644 --- a/Signal/translations/el_GR.lproj/Localizable.strings +++ b/Signal/translations/el_GR.lproj/Localizable.strings @@ -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" = "Φόρτωμα παλαιότερων μηνυμάτων"; diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index c70c31e10..96e481d04 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/es.lproj/Localizable.strings b/Signal/translations/es.lproj/Localizable.strings index 3337c4f9f..bc7eb7f04 100644 --- a/Signal/translations/es.lproj/Localizable.strings +++ b/Signal/translations/es.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/et.lproj/Localizable.strings b/Signal/translations/et.lproj/Localizable.strings index 63a7b9009..96bad2c8c 100644 --- a/Signal/translations/et.lproj/Localizable.strings +++ b/Signal/translations/et.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/fa.lproj/Localizable.strings b/Signal/translations/fa.lproj/Localizable.strings index d4443e040..8348af39f 100644 --- a/Signal/translations/fa.lproj/Localizable.strings +++ b/Signal/translations/fa.lproj/Localizable.strings @@ -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" = "نمایش پیام های قدیمی"; diff --git a/Signal/translations/fi.lproj/Localizable.strings b/Signal/translations/fi.lproj/Localizable.strings index 40d4a71b7..cee9a9a0b 100644 --- a/Signal/translations/fi.lproj/Localizable.strings +++ b/Signal/translations/fi.lproj/Localizable.strings @@ -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ä"; diff --git a/Signal/translations/fil.lproj/Localizable.strings b/Signal/translations/fil.lproj/Localizable.strings index ae9d7b27a..f1a0cdf56 100644 --- a/Signal/translations/fil.lproj/Localizable.strings +++ b/Signal/translations/fil.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/fr.lproj/Localizable.strings b/Signal/translations/fr.lproj/Localizable.strings index 478d23cc3..0ae393540 100644 --- a/Signal/translations/fr.lproj/Localizable.strings +++ b/Signal/translations/fr.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/gl.lproj/Localizable.strings b/Signal/translations/gl.lproj/Localizable.strings index eb50d47ec..5e0af5483 100644 --- a/Signal/translations/gl.lproj/Localizable.strings +++ b/Signal/translations/gl.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/he.lproj/Localizable.strings b/Signal/translations/he.lproj/Localizable.strings index fb67b034a..2eab89758 100644 --- a/Signal/translations/he.lproj/Localizable.strings +++ b/Signal/translations/he.lproj/Localizable.strings @@ -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" = "טען הודעות מוקדמות יותר"; diff --git a/Signal/translations/hr.lproj/Localizable.strings b/Signal/translations/hr.lproj/Localizable.strings index 1d718e869..57849e133 100644 --- a/Signal/translations/hr.lproj/Localizable.strings +++ b/Signal/translations/hr.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/hu.lproj/Localizable.strings b/Signal/translations/hu.lproj/Localizable.strings index d582b3bab..ca67dcab2 100644 --- a/Signal/translations/hu.lproj/Localizable.strings +++ b/Signal/translations/hu.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/id.lproj/Localizable.strings b/Signal/translations/id.lproj/Localizable.strings index 4a6e2ee58..b32274278 100644 --- a/Signal/translations/id.lproj/Localizable.strings +++ b/Signal/translations/id.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/it_IT.lproj/Localizable.strings b/Signal/translations/it_IT.lproj/Localizable.strings index 86fdc019f..ba973261f 100644 --- a/Signal/translations/it_IT.lproj/Localizable.strings +++ b/Signal/translations/it_IT.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/ja_JP.lproj/Localizable.strings b/Signal/translations/ja_JP.lproj/Localizable.strings index 4939a437e..760123a4e 100644 --- a/Signal/translations/ja_JP.lproj/Localizable.strings +++ b/Signal/translations/ja_JP.lproj/Localizable.strings @@ -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" = "以前のメッセージを読み込む"; diff --git a/Signal/translations/km.lproj/Localizable.strings b/Signal/translations/km.lproj/Localizable.strings index 4d6c84ee9..d7c3c9e9a 100644 --- a/Signal/translations/km.lproj/Localizable.strings +++ b/Signal/translations/km.lproj/Localizable.strings @@ -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" = "ផ្ទុកសារពីមុន"; diff --git a/Signal/translations/ko_KR.lproj/Localizable.strings b/Signal/translations/ko_KR.lproj/Localizable.strings index f099fed70..5695bd2a3 100644 --- a/Signal/translations/ko_KR.lproj/Localizable.strings +++ b/Signal/translations/ko_KR.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/lt.lproj/Localizable.strings b/Signal/translations/lt.lproj/Localizable.strings index 6949e4a81..360a53198 100644 --- a/Signal/translations/lt.lproj/Localizable.strings +++ b/Signal/translations/lt.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/lv.lproj/Localizable.strings b/Signal/translations/lv.lproj/Localizable.strings index 69a1cfa39..82051122c 100644 --- a/Signal/translations/lv.lproj/Localizable.strings +++ b/Signal/translations/lv.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/mk.lproj/Localizable.strings b/Signal/translations/mk.lproj/Localizable.strings index 013813457..370431c76 100644 --- a/Signal/translations/mk.lproj/Localizable.strings +++ b/Signal/translations/mk.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/my.lproj/Localizable.strings b/Signal/translations/my.lproj/Localizable.strings index b88c91869..c34e3b1c6 100644 --- a/Signal/translations/my.lproj/Localizable.strings +++ b/Signal/translations/my.lproj/Localizable.strings @@ -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" = "အပေါ်က စာများကို ဖွင့်ပါ"; diff --git a/Signal/translations/nb_NO.lproj/Localizable.strings b/Signal/translations/nb_NO.lproj/Localizable.strings index 114a43fb7..920e69e65 100644 --- a/Signal/translations/nb_NO.lproj/Localizable.strings +++ b/Signal/translations/nb_NO.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/nl.lproj/Localizable.strings b/Signal/translations/nl.lproj/Localizable.strings index bbdfa085b..ed7366856 100644 --- a/Signal/translations/nl.lproj/Localizable.strings +++ b/Signal/translations/nl.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/pl.lproj/Localizable.strings b/Signal/translations/pl.lproj/Localizable.strings index d59dba62e..9fdd6ea38 100644 --- a/Signal/translations/pl.lproj/Localizable.strings +++ b/Signal/translations/pl.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/pt_BR.lproj/Localizable.strings b/Signal/translations/pt_BR.lproj/Localizable.strings index 6ea42b6f0..4420f9a04 100644 --- a/Signal/translations/pt_BR.lproj/Localizable.strings +++ b/Signal/translations/pt_BR.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/pt_PT.lproj/Localizable.strings b/Signal/translations/pt_PT.lproj/Localizable.strings index ce9e34d9f..641549cb7 100644 --- a/Signal/translations/pt_PT.lproj/Localizable.strings +++ b/Signal/translations/pt_PT.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/ro.lproj/Localizable.strings b/Signal/translations/ro.lproj/Localizable.strings index 0c053bdde..92c856b3b 100644 --- a/Signal/translations/ro.lproj/Localizable.strings +++ b/Signal/translations/ro.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/ru.lproj/Localizable.strings b/Signal/translations/ru.lproj/Localizable.strings index 5f15965ef..8048a1d9e 100644 --- a/Signal/translations/ru.lproj/Localizable.strings +++ b/Signal/translations/ru.lproj/Localizable.strings @@ -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" = "Загрузить более ранние сообщения"; diff --git a/Signal/translations/sl.lproj/Localizable.strings b/Signal/translations/sl.lproj/Localizable.strings index 717b73114..71954bbea 100644 --- a/Signal/translations/sl.lproj/Localizable.strings +++ b/Signal/translations/sl.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/sn.lproj/Localizable.strings b/Signal/translations/sn.lproj/Localizable.strings index 8b603755d..e59760141 100644 --- a/Signal/translations/sn.lproj/Localizable.strings +++ b/Signal/translations/sn.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/sq.lproj/Localizable.strings b/Signal/translations/sq.lproj/Localizable.strings index 87ea50091..c12f9ba48 100644 --- a/Signal/translations/sq.lproj/Localizable.strings +++ b/Signal/translations/sq.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/sv_SE.lproj/Localizable.strings b/Signal/translations/sv_SE.lproj/Localizable.strings index e08bbf6bc..b80bf08e3 100644 --- a/Signal/translations/sv_SE.lproj/Localizable.strings +++ b/Signal/translations/sv_SE.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/th_TH.lproj/Localizable.strings b/Signal/translations/th_TH.lproj/Localizable.strings index a2b43295a..e6281554f 100644 --- a/Signal/translations/th_TH.lproj/Localizable.strings +++ b/Signal/translations/th_TH.lproj/Localizable.strings @@ -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" = "โหลดข้อความก่อนหน้านี้"; diff --git a/Signal/translations/tr_TR.lproj/Localizable.strings b/Signal/translations/tr_TR.lproj/Localizable.strings index 575f5be3d..469efec7b 100644 --- a/Signal/translations/tr_TR.lproj/Localizable.strings +++ b/Signal/translations/tr_TR.lproj/Localizable.strings @@ -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"; diff --git a/Signal/translations/zh_CN.lproj/Localizable.strings b/Signal/translations/zh_CN.lproj/Localizable.strings index 9089705de..c79cafa49 100644 --- a/Signal/translations/zh_CN.lproj/Localizable.strings +++ b/Signal/translations/zh_CN.lproj/Localizable.strings @@ -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" = "加载早前的消息"; diff --git a/Signal/translations/zh_TW.lproj/Localizable.strings b/Signal/translations/zh_TW.lproj/Localizable.strings index baee16769..975996906 100644 --- a/Signal/translations/zh_TW.lproj/Localizable.strings +++ b/Signal/translations/zh_TW.lproj/Localizable.strings @@ -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" = "讀取較早訊息"; diff --git a/SignalMessaging/categories/UIColor+OWS.h b/SignalMessaging/categories/UIColor+OWS.h index 7e3038a9b..650507020 100644 --- a/SignalMessaging/categories/UIColor+OWS.h +++ b/SignalMessaging/categories/UIColor+OWS.h @@ -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; diff --git a/SignalMessaging/categories/UIColor+OWS.m b/SignalMessaging/categories/UIColor+OWS.m index 12dbe9087..c9293d968 100644 --- a/SignalMessaging/categories/UIColor+OWS.m +++ b/SignalMessaging/categories/UIColor+OWS.m @@ -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 = @[ diff --git a/SignalMessaging/environment/OWSAudioSession.swift b/SignalMessaging/environment/OWSAudioSession.swift index c331587da..1822e4170 100644 --- a/SignalMessaging/environment/OWSAudioSession.swift +++ b/SignalMessaging/environment/OWSAudioSession.swift @@ -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 diff --git a/SignalMessaging/environment/OWSSounds.h b/SignalMessaging/environment/OWSSounds.h index f2f311dd7..746470f21 100644 --- a/SignalMessaging/environment/OWSSounds.h +++ b/SignalMessaging/environment/OWSSounds.h @@ -34,6 +34,7 @@ typedef NS_ENUM(NSUInteger, OWSSound) { OWSSound_CallFailure, // Other + OWSSound_MessageSent, OWSSound_None, OWSSound_DefaultiOSIncomingRingtone = OWSSound_Opening, }; diff --git a/SignalMessaging/environment/OWSSounds.m b/SignalMessaging/environment/OWSSounds.m index 9e29a8653..9d2156215 100644 --- a/SignalMessaging/environment/OWSSounds.m +++ b/SignalMessaging/environment/OWSSounds.m @@ -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: diff --git a/SignalMessaging/utils/OWSMessagesBubbleImageFactory.swift b/SignalMessaging/utils/OWSMessagesBubbleImageFactory.swift index ef923b9bd..12f743c7a 100644 --- a/SignalMessaging/utils/OWSMessagesBubbleImageFactory.swift +++ b/SignalMessaging/utils/OWSMessagesBubbleImageFactory.swift @@ -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) - } - } }