diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/AttachmentKeyboard.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/AttachmentKeyboard.java index df843381a..0da7de992 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/AttachmentKeyboard.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/AttachmentKeyboard.java @@ -28,6 +28,7 @@ public class AttachmentKeyboard extends FrameLayout implements InputAwareLayout. private static final List DEFAULT_BUTTONS = Arrays.asList( AttachmentKeyboardButton.GALLERY, + AttachmentKeyboardButton.GIF, AttachmentKeyboardButton.FILE, AttachmentKeyboardButton.PAYMENT, AttachmentKeyboardButton.CONTACT, diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/AttachmentKeyboardButton.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/AttachmentKeyboardButton.java index 0c7f2ed7a..db3bcd125 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/AttachmentKeyboardButton.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/AttachmentKeyboardButton.java @@ -8,6 +8,7 @@ import org.thoughtcrime.securesms.R; public enum AttachmentKeyboardButton { GALLERY(R.string.AttachmentKeyboard_gallery, R.drawable.ic_photo_album_outline_32), + GIF(R.string.AttachmentKeyboard_gif, R.drawable.ic_gif_outline_32), FILE(R.string.AttachmentKeyboard_file, R.drawable.ic_file_outline_32), PAYMENT(R.string.AttachmentKeyboard_payment, R.drawable.ic_payments_32), CONTACT(R.string.AttachmentKeyboard_contact, R.drawable.ic_contact_circle_outline_32), diff --git a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java index 1046bae7c..e08595865 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java +++ b/app/src/main/java/org/thoughtcrime/securesms/conversation/ConversationActivity.java @@ -1104,7 +1104,15 @@ public class ConversationActivity extends PassphraseRequiredActivity case GALLERY: AttachmentManager.selectGallery(this, MEDIA_SENDER, recipient.get(), composeText.getTextTrimmed(), sendButton.getSelectedTransport()); break; - case FILE: + case GIF: + new MaterialAlertDialogBuilder(this) + .setTitle(R.string.ConversationActivity_gifs_have_moved) + .setMessage(R.string.ConversationActivity_look_for_gifs_next_to_emoji_and_stickers) + .setPositiveButton(android.R.string.ok, null) + .setOnDismissListener(unused -> inputPanel.showGifMovedTooltip()) + .show(); + break; + case FILE: AttachmentManager.selectDocument(this, PICK_DOCUMENT); break; case CONTACT: @@ -1422,16 +1430,6 @@ public class ConversationActivity extends PassphraseRequiredActivity container.show(composeText, attachmentKeyboardStub.get()); viewModel.onAttachmentKeyboardOpen(); - - if (!SignalStore.tooltips().hasSeenGifsHaveMoved()) { - new MaterialAlertDialogBuilder(this) - .setTitle(R.string.ConversationActivity_gifs_have_moved) - .setMessage(R.string.ConversationActivity_look_for_gifs_next_to_emoji_and_stickers) - .setPositiveButton(android.R.string.ok, null) - .setOnDismissListener(unused -> inputPanel.showGifMovedTooltip()) - .show(); - SignalStore.tooltips().markGifsHaveMovedSeen(); - } } } else { handleManualMmsRequired(); diff --git a/app/src/main/java/org/thoughtcrime/securesms/keyvalue/TooltipValues.java b/app/src/main/java/org/thoughtcrime/securesms/keyvalue/TooltipValues.java index 5ff1c7dbb..6db83250f 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/keyvalue/TooltipValues.java +++ b/app/src/main/java/org/thoughtcrime/securesms/keyvalue/TooltipValues.java @@ -12,7 +12,6 @@ public class TooltipValues extends SignalStoreValues { private static final String BLUR_HUD_ICON = "tooltip.blur_hud_icon"; private static final String GROUP_CALL_SPEAKER_VIEW = "tooltip.group_call_speaker_view"; private static final String GROUP_CALL_TOOLTIP_DISPLAY_COUNT = "tooltip.group_call_tooltip_display_count"; - private static final String GIFS_HAVE_MOVED = "tooltip.gifs_have_moved"; TooltipValues(@NonNull KeyValueStore store) { @@ -55,12 +54,4 @@ public class TooltipValues extends SignalStoreValues { public void markGroupCallingLobbyEntered() { putInteger(GROUP_CALL_TOOLTIP_DISPLAY_COUNT, Integer.MAX_VALUE); } - - public boolean hasSeenGifsHaveMoved() { - return getBoolean(GIFS_HAVE_MOVED, false); - } - - public void markGifsHaveMovedSeen() { - putBoolean(GIFS_HAVE_MOVED, true); - } } diff --git a/app/src/main/res/drawable/ic_gif_outline_32.xml b/app/src/main/res/drawable/ic_gif_outline_32.xml new file mode 100644 index 000000000..03260f34f --- /dev/null +++ b/app/src/main/res/drawable/ic_gif_outline_32.xml @@ -0,0 +1,9 @@ + + +