From 62ba5701f667f2e03cdda80d04d8a2b546dfb637 Mon Sep 17 00:00:00 2001 From: Matthew Chen Date: Tue, 26 Sep 2017 12:43:01 -0400 Subject: [PATCH] Sketch out GIF picker. // FREEBIE --- .../ConversationView/ConversationViewController.m | 4 ++++ Signal/src/ViewControllers/HomeViewController.m | 7 ++++++- Signal/translations/en.lproj/Localizable.strings | 9 +++++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m index bb5a7bc80..8251cd48e 100644 --- a/Signal/src/ViewControllers/ConversationView/ConversationViewController.m +++ b/Signal/src/ViewControllers/ConversationView/ConversationViewController.m @@ -662,6 +662,10 @@ typedef NS_ENUM(NSInteger, MessagesRangeSizeMode) { [self createScrollDownButton]; [self createHeaderViews]; [self addNotificationListeners]; + + dispatch_async(dispatch_get_main_queue(), ^{ + [self showGifPicker]; + }); } - (void)registerCustomMessageNibs diff --git a/Signal/src/ViewControllers/HomeViewController.m b/Signal/src/ViewControllers/HomeViewController.m index 377c75db6..39b87b51d 100644 --- a/Signal/src/ViewControllers/HomeViewController.m +++ b/Signal/src/ViewControllers/HomeViewController.m @@ -273,7 +273,12 @@ typedef NS_ENUM(NSInteger, CellState) { kArchiveState, kInboxState }; [self updateBarButtonItems]; - [GifManager.sharedInstance test]; + // [GifManager.sharedInstance test]; + + dispatch_async(dispatch_get_main_queue(), ^{ + TSThread *thread = [self threadForIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; + [self presentThread:thread keyboardOnViewAppearing:NO callOnViewAppearing:NO]; + }); } - (void)updateBarButtonItems diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index ce36dc0d4..e50abe44b 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -601,6 +601,12 @@ /* A label for generic attachments. */ "GENERIC_ATTACHMENT_LABEL" = "Attachment"; +/* Title for the 'gif picker' dialog. */ +"GIF_PICKER_VIEW_TITLE" = "Gif Search"; + +/* Placeholder text for the search field in gif view */ +"GIF_VIEW_SEARCH_PLACEHOLDER_TEXT" = "Enter your search"; + /* No comment provided by engineer. */ "GROUP_AVATAR_CHANGED" = "Avatar changed. "; @@ -1295,6 +1301,9 @@ /* No comment provided by engineer. */ "SECURE_SESSION_RESET" = "Secure session was reset."; +/* Label for 'select gif to attach' action sheet button */ +"SELECT_GIF_BUTTON" = "Gif"; + /* No comment provided by engineer. */ "SEND_AGAIN_BUTTON" = "Send Again";