Set device link message TTL, clean & add more analytics

pull/56/head
Niels Andriesse 5 years ago
parent 9fcb0f610f
commit 40bb4ba1a4

@ -62,7 +62,6 @@ def shared_pods
pod 'PureLayout', :inhibit_warnings => true
pod 'Reachability', :inhibit_warnings => true
pod 'YYImage', :inhibit_warnings => true
pod 'IGIdenticon', :inhibit_warnings => true
end
target 'Signal' do

@ -56,7 +56,6 @@ PODS:
- HKDFKit/Tests (0.0.4):
- CocoaLumberjack
- SignalCoreKit
- IGIdenticon (0.6)
- libPhoneNumber-iOS (0.9.13)
- Mantle (2.1.0):
- Mantle/extobjc (= 2.1.0)
@ -220,7 +219,6 @@ DEPENDENCIES:
- GRKOpenSSLFramework (from `https://github.com/signalapp/GRKOpenSSLFramework`)
- HKDFKit (from `https://github.com/signalapp/HKDFKit.git`)
- HKDFKit/Tests (from `https://github.com/signalapp/HKDFKit.git`)
- IGIdenticon
- Mantle (from `https://github.com/signalapp/Mantle`, branch `signal-master`)
- Mixpanel (~> 3.4)
- NVActivityIndicatorView (~> 4.7)
@ -250,7 +248,6 @@ SPEC REPOS:
- FirebaseCore
- GCDWebServer
- GoogleUtilities
- IGIdenticon
- libPhoneNumber-iOS
- Mixpanel
- NVActivityIndicatorView
@ -332,7 +329,6 @@ SPEC CHECKSUMS:
GoogleUtilities: 996e0db07153674fd1b54b220fda3a3dc3547cba
GRKOpenSSLFramework: 8a3735ad41e7dc1daff460467bccd32ca5d6ae3e
HKDFKit: 3b6dbbb9d59c221cc6c52c3aa915700cbf24e376
IGIdenticon: 5790befde4fe56296927c72c0efed3d07b21de8e
libPhoneNumber-iOS: e444379ac18bbfbdefad571da735b2cd7e096caa
Mantle: 2fa750afa478cd625a94230fbf1c13462f29395b
Mixpanel: 696e0a1c7f2685aa06bb23829b7a58ab7203d6c7
@ -351,6 +347,6 @@ SPEC CHECKSUMS:
YapDatabase: b418a4baa6906e8028748938f9159807fd039af4
YYImage: 1e1b62a9997399593e4b9c4ecfbbabbf1d3f3b54
PODFILE CHECKSUM: ff66104e65cc960ed08a74b71c27f5caf59f4239
PODFILE CHECKSUM: 156b349e2791f53224143291e318592b9c1f7ade
COCOAPODS: 1.5.3

@ -3366,7 +3366,6 @@
"${PODS_ROOT}/GRKOpenSSLFramework/OpenSSL-iOS/bin/openssl.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/HKDFKit/HKDFKit.framework",
"${BUILT_PRODUCTS_DIR}/IGIdenticon/IGIdenticon.framework",
"${BUILT_PRODUCTS_DIR}/Mantle/Mantle.framework",
"${BUILT_PRODUCTS_DIR}/Mixpanel/Mixpanel.framework",
"${BUILT_PRODUCTS_DIR}/NVActivityIndicatorView/NVActivityIndicatorView.framework",
@ -3397,7 +3396,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HKDFKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGIdenticon.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mantle.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mixpanel.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/NVActivityIndicatorView.framework",
@ -3453,7 +3451,6 @@
"${BUILT_PRODUCTS_DIR}/Curve25519Kit/Curve25519Kit.framework",
"${PODS_ROOT}/GRKOpenSSLFramework/OpenSSL-iOS/bin/openssl.framework",
"${BUILT_PRODUCTS_DIR}/HKDFKit/HKDFKit.framework",
"${BUILT_PRODUCTS_DIR}/IGIdenticon/IGIdenticon.framework",
"${BUILT_PRODUCTS_DIR}/Mantle/Mantle.framework",
"${BUILT_PRODUCTS_DIR}/PromiseKit/PromiseKit.framework",
"${BUILT_PRODUCTS_DIR}/PureLayout/PureLayout.framework",
@ -3478,7 +3475,6 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Curve25519Kit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/openssl.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HKDFKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/IGIdenticon.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Mantle.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PromiseKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/PureLayout.framework",

Before

Width:  |  Height:  |  Size: 277 B

After

Width:  |  Height:  |  Size: 277 B

@ -0,0 +1,6 @@
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}

@ -319,10 +319,10 @@ static NSTimeInterval launchStartedAt;
name:NSNotificationName_2FAStateDidChange
object:nil];
// Loki - Observe messages received notifications
// Loki - Observe new messages received notifications
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleNewMessagesReceived:) name:NSNotification.newMessagesReceived object:nil];
// Loki - Observe thread deletion notifications
// Loki - Observe thread deleted notifications
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleThreadDeleted:) name:NSNotification.threadDeleted object:nil];
OWSLogInfo(@"application: didFinishLaunchingWithOptions completed.");
@ -744,7 +744,7 @@ static NSTimeInterval launchStartedAt;
// and continue cleaning in the background.
[self.disappearingMessagesJob startIfNecessary];
// Start Loki friend request expire job
// Loki: Start friend request expiration job
[self.lokiFriendRequestExpirationJob startIfNecessary];
[self enableBackgroundRefreshIfNecessary];
@ -1206,6 +1206,7 @@ static NSTimeInterval launchStartedAt;
performFetchWithCompletionHandler:(void (^)(UIBackgroundFetchResult result))completionHandler
{
NSLog(@"[Loki] Performing background fetch.");
[LKAnalytics.shared track:@"Performed Background Fetch"];
[AppReadiness runNowOrWhenAppDidBecomeReady:^{
__block AnyPromise *job = [AppEnvironment.shared.messageFetcherJob run].then(^{
completionHandler(UIBackgroundFetchResultNewData);

@ -109,7 +109,7 @@ public class SessionResetOperation: OWSOperation, DurableOperation {
assert(self.durableOperationDelegate != nil)
/* Loki: Original code
* We don't want to delete session. Ref: SignalServiceKit/Loki/Docs/SessionReset.md
* We don't want to delete the session. Ref: SignalServiceKit/Loki/Docs/SessionReset.md
* ================
if firstAttempt {
self.dbConnection.readWrite { transaction in

@ -1,5 +1,7 @@
import GCDWebServer
// TODO: Clean
private extension GCDWebServerResponse {
convenience init<E: RawRepresentable>(statusCode: E) where E.RawValue == Int {

@ -50,6 +50,7 @@ final class DisplayNameVC : OnboardingBaseViewController {
stackView.autoPin(toTopLayoutGuideOf: self, withInset: 0)
autoPinView(toBottomOfViewControllerOrKeyboard: stackView, avoidNotch: true)
topSpacer.autoMatch(.height, to: .height, of: bottomSpacer)
Analytics.shared.track("Display Name Screen Viewed")
}
override func viewDidAppear(_ animated: Bool) {

@ -194,6 +194,7 @@ final class SeedVC : OnboardingBaseViewController, DeviceLinkingModalDelegate {
setUpViewHierarchy()
handleModeChanged() // Perform initial update
updateSeed()
Analytics.shared.track("Seed Screen Viewed")
}
private func setUpViewHierarchy() {
@ -335,7 +336,7 @@ final class SeedVC : OnboardingBaseViewController, DeviceLinkingModalDelegate {
switch mode {
case .register: Analytics.shared.track("Seed Created")
case .restore: Analytics.shared.track("Seed Restored")
case .link: Analytics.shared.track("Device Linked")
case .link: Analytics.shared.track("Device Linking Attempted")
}
if mode == .link {
TSAccountManager.sharedInstance().didRegister()
@ -366,6 +367,7 @@ final class SeedVC : OnboardingBaseViewController, DeviceLinkingModalDelegate {
linkingRequestMessageSendingTimer?.invalidate()
UserDefaults.standard.set(true, forKey: "didUpdateForMainnet")
onboardingController.verificationDidComplete(fromView: self)
Analytics.shared.track("Device Linked Successfully")
}
func handleDeviceLinkingModalDismissed() {

@ -4,6 +4,11 @@ import NVActivityIndicatorView
final class NukeDataModal : Modal {
// MARK: Lifecycle
override func viewDidLoad() {
super.viewDidLoad()
Analytics.shared.track("Nuke Data Modal Shown")
}
override func populateContentView() {
// Label
let titleLabel = UILabel()
@ -43,6 +48,7 @@ final class NukeDataModal : Modal {
// MARK: Interaction
@objc private func nuke() {
Analytics.shared.track("Data Nuked")
ThreadUtil.deleteAllContent()
SSKEnvironment.shared.identityManager.clearIdentityKey()
LokiAPI.clearRandomSnodePool()

@ -14,6 +14,11 @@ final class SeedModal : Modal {
}()
// MARK: Lifecycle
override func viewDidLoad() {
super.viewDidLoad()
Analytics.shared.track("Seed Modal Shown")
}
override func populateContentView() {
// Label
let titleLabel = UILabel()

@ -21,6 +21,7 @@
#import <SignalMessaging/UIUtil.h>
#import <SignalServiceKit/TSAccountManager.h>
#import <SignalServiceKit/TSSocketManager.h>
#import "Session-Swift.h"
@interface AppSettingsViewController ()
@ -91,6 +92,8 @@
self.title = NSLocalizedString(@"SETTINGS_NAV_BAR_TITLE", @"Title for settings activity");
[self updateTableContents];
[LKAnalytics.shared track:@"Settings Opened"];
}
- (void)viewWillAppear:(BOOL)animated
@ -501,9 +504,10 @@
- (void)sharePublicKey
{
NSString *publicKey = OWSIdentityManager.sharedManager.identityKeyPair.hexEncodedPublicKey;
UIActivityViewController *shareVC = [[UIActivityViewController alloc] initWithActivityItems:@[ publicKey ] applicationActivities:nil];
NSString *hexEncodedPublicKey = OWSIdentityManager.sharedManager.identityKeyPair.hexEncodedPublicKey;
UIActivityViewController *shareVC = [[UIActivityViewController alloc] initWithActivityItems:@[ hexEncodedPublicKey ] applicationActivities:nil];
[self presentViewController:shareVC animated:YES completion:nil];
[LKAnalytics.shared track:@"Public Key Shared"];
}
- (void)showQRCode

@ -9,6 +9,7 @@
#import <SignalMessaging/OWSPreferences.h>
#import <SignalMessaging/OWSSounds.h>
#import <SignalMessaging/UIUtil.h>
#import "Session-Swift.h"
@implementation NotificationSettingsViewController
@ -19,6 +20,8 @@
[self setTitle:NSLocalizedString(@"SETTINGS_NOTIFICATIONS", nil)];
[self updateTableContents];
[LKAnalytics.shared track:@"Notification Settings Opened"];
}
- (void)viewDidAppear:(BOOL)animated

@ -30,6 +30,8 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
[self observeNotifications];
[self updateTableContents];
[LKAnalytics.shared track:@"Privacy Settings Opened"];
}
- (void)viewDidAppear:(BOOL)animated
@ -445,6 +447,7 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
- (void)deleteThreadsAndMessages
{
[LKAnalytics.shared track:@"Conversation History Cleared"];
[ThreadUtil deleteAllContent];
}
@ -452,6 +455,11 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
{
BOOL enabled = sender.isOn;
OWSLogInfo(@"toggled screen security: %@", enabled ? @"ON" : @"OFF");
if (enabled) {
[LKAnalytics.shared track:@"Screen Security Enabled"];
} else {
[LKAnalytics.shared track:@"Screen Security Disabled"];
}
[self.preferences setScreenSecurity:enabled];
}
@ -466,6 +474,11 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
{
BOOL enabled = sender.isOn;
OWSLogInfo(@"toggled areTypingIndicatorsEnabled: %@", enabled ? @"ON" : @"OFF");
if (enabled) {
[LKAnalytics.shared track:@"Typing Indicators Enabled"];
} else {
[LKAnalytics.shared track:@"Typing Indicators Disabled"];
}
[self.typingIndicators setTypingIndicatorsEnabledWithValue:enabled];
}
@ -521,6 +534,11 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
- (void)didToggleLinkPreviewsEnabled:(UISwitch *)sender
{
OWSLogInfo(@"toggled to: %@", (sender.isOn ? @"ON" : @"OFF"));
if (sender.isOn) {
[LKAnalytics.shared track:@"Link Previews Enabled"];
} else {
[LKAnalytics.shared track:@"Link Previews Disabled"];
}
SSKPreferences.areLinkPreviewsEnabled = sender.isOn;
}
@ -544,6 +562,12 @@ static NSString *const kSealedSenderInfoURL = @"https://signal.org/blog/sealed-s
OWSLogInfo(@"trying to set is screen lock enabled: %@", @(shouldBeEnabled));
if (shouldBeEnabled) {
[LKAnalytics.shared track:@"Screen Lock Enabled"];
} else {
[LKAnalytics.shared track:@"Screen Lock Disabled"];
}
[OWSScreenLock.sharedManager setIsScreenLockEnabled:shouldBeEnabled];
}

@ -20,7 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic) OWSMessageBubbleView *messageBubbleView;
@property (nonatomic) NSLayoutConstraint *messageBubbleViewBottomConstraint;
@property (nonatomic) AvatarImageView *avatarView;
@property (nonatomic) UIImageView *moderatorIconView;
@property (nonatomic) UIImageView *moderatorIconImageView;
@property (nonatomic, nullable) LKFriendRequestView *friendRequestView;
@property (nonatomic, nullable) UIImageView *sendFailureBadgeView;
@ -62,10 +62,10 @@ NS_ASSUME_NONNULL_BEGIN
[self.avatarView autoSetDimension:ALDimensionWidth toSize:self.avatarSize];
[self.avatarView autoSetDimension:ALDimensionHeight toSize:self.avatarSize];
self.moderatorIconView = [[UIImageView alloc] init];
[self.moderatorIconView autoSetDimension:ALDimensionWidth toSize:20.f];
[self.moderatorIconView autoSetDimension:ALDimensionHeight toSize:20.f];
self.moderatorIconView.hidden = YES;
self.moderatorIconImageView = [[UIImageView alloc] init];
[self.moderatorIconImageView autoSetDimension:ALDimensionWidth toSize:20.f];
[self.moderatorIconImageView autoSetDimension:ALDimensionHeight toSize:20.f];
self.moderatorIconImageView.hidden = YES;
self.messageBubbleViewBottomConstraint = [self.messageBubbleView autoPinBottomToSuperviewMarginWithInset:0];
@ -235,8 +235,8 @@ NS_ASSUME_NONNULL_BEGIN
]];
[self.viewConstraints addObjectsFromArray:@[
[self.moderatorIconView autoPinEdge:ALEdgeTrailing toEdge:ALEdgeTrailing ofView:self.avatarView],
[self.moderatorIconView autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.avatarView withOffset:3.5]
[self.moderatorIconImageView autoPinEdge:ALEdgeTrailing toEdge:ALEdgeTrailing ofView:self.avatarView],
[self.moderatorIconImageView autoPinEdge:ALEdgeBottom toEdge:ALEdgeBottom ofView:self.avatarView withOffset:3.5]
]];
}
}
@ -300,11 +300,11 @@ NS_ASSUME_NONNULL_BEGIN
if (self.viewItem.isGroupThread && !self.viewItem.isRSSFeed) {
BOOL isModerator = [LKGroupChatAPI isUserModerator:incomingMessage.authorId forGroup:LKGroupChatAPI.publicChatServerID onServer:LKGroupChatAPI.publicChatServer];
UIImage *moderatorIcon = [UIImage imageNamed:@"Crown"];
self.moderatorIconView.image = moderatorIcon;
self.moderatorIconView.hidden = !isModerator;
self.moderatorIconImageView.image = moderatorIcon;
self.moderatorIconImageView.hidden = !isModerator;
}
[self.contentView addSubview:self.moderatorIconView];
[self.contentView addSubview:self.moderatorIconImageView];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(otherUsersProfileDidChange:)
@ -405,8 +405,8 @@ NS_ASSUME_NONNULL_BEGIN
self.avatarView.image = nil;
[self.avatarView removeFromSuperview];
self.moderatorIconView.image = nil;
[self.moderatorIconView removeFromSuperview];
self.moderatorIconImageView.image = nil;
[self.moderatorIconImageView removeFromSuperview];
[self.sendFailureBadgeView removeFromSuperview];
self.sendFailureBadgeView = nil;

@ -123,7 +123,7 @@ NS_ASSUME_NONNULL_BEGIN
[MessageRecipientStatusUtils recipientStatusWithOutgoingMessage:outgoingMessage];
switch (messageStatus) {
case MessageReceiptStatusCalculatingPoW:
statusIndicatorImage = [UIImage imageNamed:@"message_status_pow"];
statusIndicatorImage = [UIImage imageNamed:@"Cog"];
[self animateSpinningIcon];
break;
case MessageReceiptStatusUploading:

@ -616,6 +616,7 @@ typedef enum : NSUInteger {
[self applyTheme];
[self.conversationViewModel viewDidLoad];
// Loki: Track events
if (self.thread.isGroupThread) {
if (self.isRSSFeed) {
[LKAnalytics.shared track:@"RSS Feed Opened"];

@ -309,7 +309,7 @@ NS_ASSUME_NONNULL_BEGIN
[MessageRecipientStatusUtils recipientStatusWithOutgoingMessage:outgoingMessage];
switch (messageStatus) {
case MessageReceiptStatusCalculatingPoW:
statusIndicatorImage = [UIImage imageNamed:@"message_status_pow"];
statusIndicatorImage = [UIImage imageNamed:@"Cog"];
shouldAnimateStatusIcon = YES;
break;
case MessageReceiptStatusUploading:

@ -1428,7 +1428,7 @@ typedef NS_ENUM(NSInteger, HomeViewControllerSection) {
[thread removeWithTransaction:transaction];
}];
// Loki - Post notification
// Loki: Post notification
[[NSNotificationCenter defaultCenter] postNotificationName:NSNotification.threadDeleted object:nil userInfo:@{ @"threadId": thread.uniqueId }];
[self updateViewState];

@ -18,7 +18,7 @@ public class LoadingViewController: UIViewController {
self.view = UIView()
view.backgroundColor = UIColor.lokiDarkestGray()
self.logoView = UIImageView(image: #imageLiteral(resourceName: "LokiLogo"))
self.logoView = UIImageView(image: #imageLiteral(resourceName: "Loki"))
view.addSubview(logoView)
logoView.autoCenterInSuperview()

@ -401,6 +401,8 @@ NSString *const kProfileView_LastPresentedDate = @"kProfileView_LastPresentedDat
return;
}
[LKAnalytics.shared track:@"Display Name Updated"];
// Show an activity indicator to block the UI during the profile upload.
[ModalActivityIndicatorViewController
presentFromViewController:self

@ -19,7 +19,7 @@ public class OnboardingSplashViewController: OnboardingBaseViewController {
titleLabel.autoPinEdges(toSuperviewMarginsExcludingEdge: .bottom)
titleLabel.accessibilityIdentifier = "onboarding.splash." + "titleLabel"
let lokiLogo = UIImage(named: "LokiLogo")
let lokiLogo = UIImage(named: "Loki")
let lokiLogoImageView = UIImageView(image: lokiLogo)
lokiLogoImageView.accessibilityIdentifier = "onboarding.splash." + "lokiLogoImageView"
lokiLogoImageView.autoSetDimension(.height, toSize: 71)
@ -72,6 +72,8 @@ public class OnboardingSplashViewController: OnboardingBaseViewController {
stackView.autoPin(toTopLayoutGuideOf: self, withInset: 0)
stackView.autoPin(toBottomLayoutGuideOf: self, withInset: 0)
lokiLogoImageView.autoCenterInSuperview()
Analytics.shared.track("Landing Screen Viewed")
}
// MARK: - Events

@ -292,6 +292,8 @@ const CGFloat kIconViewLength = 24;
#endif
[self updateTableContents];
[LKAnalytics.shared track:@"Conversation Settings Opened"];
}
- (void)viewDidAppear:(BOOL)animated

@ -1,11 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14490.70" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<device id="retina4_7" orientation="portrait">
<adaptation id="fullscreen"/>
</device>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14868" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14490.49"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14824"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@ -18,11 +14,11 @@
<viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="LokiLogo" translatesAutoresizingMaskIntoConstraints="NO" id="b92-yg-YYQ">
<rect key="frame" x="150" y="298" width="75" height="71"/>
<imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="Loki" translatesAutoresizingMaskIntoConstraints="NO" id="b92-yg-YYQ">
<rect key="frame" x="262.5" y="264.5" width="75" height="71"/>
<constraints>
<constraint firstAttribute="width" constant="75" id="edg-p1-IeH"/>
<constraint firstAttribute="height" constant="71" id="sRe-w6-smO"/>
@ -42,6 +38,6 @@
</scene>
</scenes>
<resources>
<image name="LokiLogo" width="1057" height="1000"/>
<image name="Loki" width="16" height="16"/>
</resources>
</document>

@ -145,6 +145,6 @@ public class JazzIcon {
private func hueShift(colours: [UIColor]) -> [UIColor] {
let amount = generator.nextCGFloat() * 30 - CGFloat(wobble / 2);
return colours.map { $0.adjust(hueBy: amount) }
return colours.map { $0.adjustHue(by: amount) }
}
}

@ -1,7 +1,7 @@
extension UIColor {
public func adjust(hueBy degrees: CGFloat) -> UIColor {
public func adjustHue(by degrees: CGFloat) -> UIColor {
var currentHue: CGFloat = 0.0
var currentSaturation: CGFloat = 0.0

@ -45,7 +45,7 @@ NSString *NSStringForScreenLockUIState(ScreenLockUIState value)
[edgesView autoPinEdgeToSuperviewEdge:ALEdgeBottom];
[edgesView autoPinWidthToSuperview];
UIImage *image = [UIImage imageNamed:@"LokiLogo"];
UIImage *image = [UIImage imageNamed:@"Loki"];
UIImageView *imageView = [UIImageView new];
imageView.image = image;
[edgesView addSubview:imageView];

@ -29,7 +29,7 @@ public class CreatePreKeysOperation: OWSOperation {
// Loki: We don't generate PreKeyRecords here.
// This is because we need the records to be linked to a contact since we don't have a central server.
// It is done automatically when we generate a PreKeyBundle to send to a contact (`generatePreKeyBundleForContact:`).
// It's done automatically when we generate a pre key bundle to send to a contact (`generatePreKeyBundleForContact:`).
// You can use `getOrCreatePreKeyForContact:` to generate one if needed.
let signedPreKeyRecord = primaryStorage.generateRandomSignedRecord()
signedPreKeyRecord.markAsAcceptedByService()

@ -65,6 +65,7 @@
}
#pragma mark Settings
- (uint)ttl { 8 * kMinuteInMs; }
- (BOOL)shouldSyncTranscript { return NO; }
- (BOOL)shouldBeSaved { return NO; }

@ -1404,7 +1404,6 @@ NS_ASSUME_NONNULL_BEGIN
}
// Loki: Don't process friend requests in group chats
if (body.length == 0 && attachmentPointers.count < 1 && !contact) {
OWSLogWarn(@"ignoring empty incoming message from: %@ for group: %@ with timestamp: %lu",
envelopeAddress(envelope),

Loading…
Cancel
Save