Merge branch 'dev' of https://github.com/oxen-io/session-ios into voice-calls-2

pull/560/head
ryanzhao 4 years ago
commit 4e36052c6c

@ -57,8 +57,11 @@ final class ShareLogsModal : Modal {
// MARK: Interaction
@objc private func shareLogs() {
let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String ?? ""
OWSLogger.info("[Version] iOS \(UIDevice.current.systemVersion) \(version)")
DDLog.flushLog()
let logFilePaths = AppEnvironment.shared.fileLogger.logFileManager.sortedLogFilePaths
if let latestLogFilePath = logFilePaths.last {
if let latestLogFilePath = logFilePaths.first {
let latestLogFileURL = URL(fileURLWithPath: latestLogFilePath)
self.dismiss(animated: true, completion: {
AttachmentSharing.showShareUI(for: latestLogFileURL)

@ -278,8 +278,18 @@ NSString *const TSLazyRestoreAttachmentsGroup = @"TSLazyRestoreAttachmentsGroup"
TSThread *thread1 = (TSThread *)object1;
TSThread *thread2 = (TSThread *)object2;
if ([group isEqualToString:TSArchiveGroup] || [group isEqualToString:TSInboxGroup]) {
NSDate *date1 = thread1.lastInteractionDate ?: thread1.creationDate;
NSDate *date2 = thread2.lastInteractionDate ?: thread2.creationDate;
TSInteraction *_Nullable lastInteractionForInbox1 =
[thread1 lastInteractionForInboxWithTransaction:transaction];
NSDate *lastInteractionForInboxDate1 = lastInteractionForInbox1 ? lastInteractionForInbox1.receivedAtDate : thread1.creationDate;
TSInteraction *_Nullable lastInteractionForInbox2 =
[thread2 lastInteractionForInboxWithTransaction:transaction];
NSDate *lastInteractionForInboxDate2 = lastInteractionForInbox2 ? lastInteractionForInbox2.receivedAtDate : thread2.creationDate;
NSDate *date1 = thread1.lastInteractionDate ?: lastInteractionForInboxDate1 ?: thread1.creationDate;
NSDate *date2 = thread2.lastInteractionDate ?: lastInteractionForInboxDate2 ?: thread2.creationDate;
return [date1 compare:date2];
}

@ -357,7 +357,9 @@ BOOL IsNoteToSelfEnabled(void)
return;
}
_lastInteractionDate = lastMessage.receivedAtDate;
if ([_lastInteractionDate compare: lastMessage.receivedAtDate] == NSOrderedAscending) {
_lastInteractionDate = lastMessage.receivedAtDate;
}
if (!self.shouldBeVisible) {
self.shouldBeVisible = YES;

@ -1,6 +1,8 @@
import SignalCoreKit
public func SNLog(_ message: String) {
#if DEBUG
print("[Session] \(message)")
#endif
OWSLogger.info("[Session] \(message)")
}

Loading…
Cancel
Save