First draft of image editor's text tool.

pull/2/head
Matthew Chen 6 years ago
parent 6ac2dd7ea1
commit 2f00cbdfeb

@ -28,7 +28,7 @@
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "EF7BE58B1F949AF31E4AF4FD37150A86"
BlueprintIdentifier = "4D5E7522A33906C902399C86F0A95AA5"
BuildableName = "SignalServiceKit.framework"
BlueprintName = "SignalServiceKit"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -56,7 +56,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "2349E04BB99C0118E8F578CCBEAAC665"
BlueprintIdentifier = "AB62203226FE5032747AA668B1E97176"
BuildableName = "SignalServiceKit-Unit-Tests.xctest"
BlueprintName = "SignalServiceKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -66,7 +66,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "3AC929F2E4978F42ED9E9EA232D7247B"
BlueprintIdentifier = "BC89BC6B06642C78EABF18B43FFB41DE"
BuildableName = "SignalCoreKit-Unit-Tests.xctest"
BlueprintName = "SignalCoreKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -76,7 +76,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "5B34FB0B5ABA685EF33F1BA1C388F016"
BlueprintIdentifier = "E012D804E31EC876E21973F300B46CCB"
BuildableName = "AxolotlKit-Unit-Tests.xctest"
BlueprintName = "AxolotlKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -86,7 +86,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "D85B45003BA81D72F606FDF3EB4B4E1C"
BlueprintIdentifier = "B4A8ABAC14D962F8F42814238460DF44"
BuildableName = "Curve25519Kit-Unit-Tests.xctest"
BlueprintName = "Curve25519Kit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -96,7 +96,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "F9C2DA0BADF4F69559F0AA5BB4FC1E06"
BlueprintIdentifier = "E5C44C64CDE3569B16010274DCD48BCC"
BuildableName = "HKDFKit-Unit-Tests.xctest"
BlueprintName = "HKDFKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -106,7 +106,7 @@
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "92057C418B970541FF6BE6E64A49D8C2"
BlueprintIdentifier = "00649589DE58D9DECF419A3CC47D6924"
BuildableName = "SignalMetadataKit-Unit-Tests.xctest"
BlueprintName = "SignalMetadataKit-Unit-Tests"
ReferencedContainer = "container:Pods/Pods.xcodeproj">
@ -136,7 +136,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
disableMainThreadChecker = "YES"
enableThreadSanitizer = "YES"
enableUBSanitizer = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"

@ -7,9 +7,9 @@
<key>CarthageVersion</key>
<string>0.31.2</string>
<key>OSXVersion</key>
<string>10.14.3</string>
<string>10.14.2</string>
<key>WebRTCCommit</key>
<string>55de5593cc261fa9368c5ccde98884ed1e278ba0 M72</string>
<string>aa8bee9bd6f69e388a9ca7506b8702ef8ab7f195 M71</string>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>

@ -1234,32 +1234,6 @@ typedef enum : NSUInteger {
self.actionOnOpen = ConversationViewActionNone;
[self updateInputToolbarLayout];
[self showDebugImageEditorAsync];
}
- (void)showDebugImageEditorAsync
{
dispatch_async(dispatch_get_main_queue(), ^{
NSString *_Nullable filePath = [[NSBundle mainBundle] pathForResource:@"qr@2x" ofType:@"png" inDirectory:nil];
if (!filePath) {
OWSFailDebug(@"Missing asset.");
}
DataSource *_Nullable dataSource =
[DataSourcePath dataSourceWithFilePath:filePath shouldDeleteOnDeallocation:NO];
if (!dataSource) {
OWSFailDebug(@"Invalid asset.");
return;
}
// "Document picker" attachments _SHOULD NOT_ be resized, if possible.
SignalAttachment *attachment = [SignalAttachment attachmentWithDataSource:dataSource
dataUTI:(NSString *)kUTTypePNG
imageQuality:TSImageQualityOriginal];
[self showApprovalDialogForAttachment:attachment];
});
}
// `viewWillDisappear` is called whenever the view *starts* to disappear,

@ -482,26 +482,8 @@ NSString *const kArchivedConversationsReuseIdentifier = @"kArchivedConversations
[self.searchResultsController viewDidAppear:animated];
self.hasEverAppeared = YES;
[self presentFirstThreadAsync];
}
#ifdef DEBUG
- (void)presentFirstThreadAsync
{
dispatch_async(dispatch_get_main_queue(), ^{
if ([self.tableView numberOfRowsInSection:HomeViewControllerSectionConversations] < 1) {
return;
}
TSThread *thread =
[self threadForIndexPath:[NSIndexPath indexPathForRow:0 inSection:HomeViewControllerSectionConversations]];
[self presentThread:thread action:ConversationViewActionNone animated:YES];
});
}
#endif
- (void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:animated];

@ -910,8 +910,6 @@ NSString *const kNSNotification_OWSWebSocketStateDidChange = @"kNSNotification_O
{
OWSAssertIsOnMainThread();
return NO;
// Don't open socket in app extensions.
if (!CurrentAppContext().isMainApp) {
return NO;

Loading…
Cancel
Save