Elaborate Debug & Internal UI.

pull/1/head
Matthew Chen 7 years ago
parent 32b3e89c54
commit 9d101c3f53

@ -991,6 +991,7 @@ NS_ASSUME_NONNULL_BEGIN
[self sendFakeMessages:counter thread:thread transaction:transaction];
}];
remainder -= batchSize;
DDLogInfo(@"%@ sendFakeMessages %zd / %zd", self.logTag, counter - remainder, counter);
}
}
@ -1010,7 +1011,8 @@ NS_ASSUME_NONNULL_BEGIN
authorId:@"+19174054215"
sourceDeviceId:0
messageBody:randomText];
DDLogError(@"%@ sendFakeMessages incoming timestamp: %llu.", self.logTag, message.timestamp);
// DDLogError(@"%@ sendFakeMessages incoming timestamp: %llu.", self.logTag,
// message.timestamp);
[message markAsReadWithTransaction:transaction sendReadReceipt:NO updateExpiration:NO];
break;
}
@ -1019,8 +1021,10 @@ NS_ASSUME_NONNULL_BEGIN
[[TSOutgoingMessage alloc] initWithTimestamp:[NSDate ows_millisecondTimeStamp]
inThread:thread
messageBody:randomText];
DDLogError(@"%@ sendFakeMessages outgoing timestamp: %llu.", self.logTag, message.timestamp);
// DDLogError(@"%@ sendFakeMessages outgoing timestamp: %llu.", self.logTag,
// message.timestamp);
[message saveWithTransaction:transaction];
[message updateWithMessageState:TSOutgoingMessageStateUnsent transaction:transaction];
break;
}
case 2: {
@ -1045,7 +1049,8 @@ NS_ASSUME_NONNULL_BEGIN
pointer.uniqueId,
]
expiresInSeconds:0];
DDLogError(@"%@ sendFakeMessages incoming attachment timestamp: %llu.", self.logTag, message.timestamp);
// DDLogError(@"%@ sendFakeMessages incoming attachment timestamp: %llu.", self.logTag,
// message.timestamp);
[message markAsReadWithTransaction:transaction sendReadReceipt:NO updateExpiration:NO];
break;
}
@ -1056,7 +1061,8 @@ NS_ASSUME_NONNULL_BEGIN
messageBody:nil
isVoiceMessage:NO
expiresInSeconds:0];
DDLogError(@"%@ sendFakeMessages outgoing attachment timestamp: %llu.", self.logTag, message.timestamp);
// DDLogError(@"%@ sendFakeMessages outgoing attachment timestamp: %llu.", self.logTag,
// message.timestamp);
NSString *filename = @"test.mp3";
UInt32 filesize = 16;
@ -1075,6 +1081,7 @@ NS_ASSUME_NONNULL_BEGIN
message.attachmentFilenameMap[attachmentStream.uniqueId] = filename;
}
[message saveWithTransaction:transaction];
[message updateWithMessageState:TSOutgoingMessageStateUnsent transaction:transaction];
break;
}
}

@ -162,7 +162,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSFail(@"%@ Missing path for attachment.", self.logTag);
return NO;
}
DDLogInfo(@"%@ Writing attachment to file: %@", self.logTag, filePath);
DDLogInfo(@"%@ Writing attachment data to file: %@", self.logTag, filePath);
return [data writeToFile:filePath options:0 error:error];
}
@ -175,7 +175,7 @@ NS_ASSUME_NONNULL_BEGIN
OWSFail(@"%@ Missing path for attachment.", self.logTag);
return NO;
}
DDLogInfo(@"%@ Writing attachment to file: %@", self.logTag, filePath);
DDLogInfo(@"%@ Writing attachment data source to file: %@", self.logTag, filePath);
return [dataSource writeToPath:filePath];
}

@ -1,5 +1,5 @@
//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
// Copyright (c) 2018 Open Whisper Systems. All rights reserved.
//
#import "TSIncomingMessage.h"
@ -156,8 +156,8 @@ NS_ASSUME_NONNULL_BEGIN
return;
}
DDLogDebug(
@"%@ marking as read uniqueId: %@ which has timestamp: %llu", self.logTag, self.uniqueId, self.timestamp);
// DDLogDebug(
// @"%@ marking as read uniqueId: %@ which has timestamp: %llu", self.logTag, self.uniqueId, self.timestamp);
_read = YES;
[self saveWithTransaction:transaction];
[self touchThreadWithTransaction:transaction];

Loading…
Cancel
Save