Merge branch 'dev' into multi-device-database

pull/52/head
Niels Andriesse 6 years ago
commit 4d3f95b69f

@ -47,7 +47,7 @@
</dict> </dict>
</array> </array>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>18</string> <string>19</string>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>
<false/> <false/>
<key>LOGS_EMAIL</key> <key>LOGS_EMAIL</key>

@ -359,7 +359,10 @@ static NSTimeInterval launchStartedAt;
NSDictionary *properties = @{ @"configuration" : LKBuildConfiguration.current }; NSDictionary *properties = @{ @"configuration" : LKBuildConfiguration.current };
[Mixpanel.sharedInstance track:event properties:properties]; [Mixpanel.sharedInstance track:event properties:properties];
}; };
#if DEBUG
#else
[FIRApp configure]; [FIRApp configure];
#endif
return YES; return YES;
} }

@ -111,7 +111,7 @@ public final class LokiGroupChatPoller : NSObject {
} }
// Poll // Poll
let _ = LokiGroupChatAPI.getMessages(for: group.serverID, on: group.server).done(on: .main) { messages in let _ = LokiGroupChatAPI.getMessages(for: group.serverID, on: group.server).done(on: .main) { messages in
messages.reversed().forEach { message in messages.forEach { message in
if message.hexEncodedPublicKey != userHexEncodedPublicKey { if message.hexEncodedPublicKey != userHexEncodedPublicKey {
processIncomingMessage(message) processIncomingMessage(message)
} else { } else {

@ -11,7 +11,7 @@ public final class LokiAPI : NSObject {
// MARK: Settings // MARK: Settings
private static let version = "v1" private static let version = "v1"
private static let maxRetryCount: UInt = 4 private static let maxRetryCount: UInt = 8
private static let defaultTimeout: TimeInterval = 20 private static let defaultTimeout: TimeInterval = 20
private static let longPollingTimeout: TimeInterval = 40 private static let longPollingTimeout: TimeInterval = 40
public static let defaultMessageTTL: UInt64 = 24 * 60 * 60 * 1000 public static let defaultMessageTTL: UInt64 = 24 * 60 * 60 * 1000

@ -7,8 +7,8 @@ public final class LokiGroupChatAPI : NSObject {
private static var moderators: [String:[UInt64:Set<String>]] = [:] // Server URL to (channel ID to set of moderator IDs) private static var moderators: [String:[UInt64:Set<String>]] = [:] // Server URL to (channel ID to set of moderator IDs)
// MARK: Settings // MARK: Settings
private static let fallbackBatchCount = 40 private static let fallbackBatchCount = 20
private static let maxRetryCount: UInt = 4 private static let maxRetryCount: UInt = 8
// MARK: Public Chat // MARK: Public Chat
#if DEBUG #if DEBUG
@ -162,7 +162,7 @@ public final class LokiGroupChatAPI : NSObject {
quote = nil quote = nil
} }
return LokiGroupMessage(serverID: serverID, hexEncodedPublicKey: hexEncodedPublicKey, displayName: displayName, body: body, type: publicChatMessageType, timestamp: timestamp, quote: quote) return LokiGroupMessage(serverID: serverID, hexEncodedPublicKey: hexEncodedPublicKey, displayName: displayName, body: body, type: publicChatMessageType, timestamp: timestamp, quote: quote)
} }.sorted { $0.timestamp < $1.timestamp }
} }
} }

@ -19,7 +19,7 @@
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.2.0</string> <string>1.2.0</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>18</string> <string>19</string>
<key>ITSAppUsesNonExemptEncryption</key> <key>ITSAppUsesNonExemptEncryption</key>
<false/> <false/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>

Loading…
Cancel
Save