kopia lustrzana https://github.com/ryukoposting/Signal-Android
Remove GIFs from attachment keyboard.
rodzic
a3a4b10f83
commit
84e27e7bff
|
@ -431,6 +431,14 @@ public class InputPanel extends LinearLayout
|
|||
microphoneRecorderView.unlockAction();
|
||||
}
|
||||
|
||||
public void showGifMovedTooltip() {
|
||||
TooltipPopup.forTarget(mediaKeyboard)
|
||||
.setBackgroundTint(ContextCompat.getColor(getContext(), R.color.signal_accent_primary))
|
||||
.setTextColor(getResources().getColor(R.color.core_white))
|
||||
.setText(R.string.ConversationActivity__gifs_are_now_here)
|
||||
.show(TooltipPopup.POSITION_ABOVE);
|
||||
}
|
||||
|
||||
public interface Listener {
|
||||
void onRecorderStarted();
|
||||
void onRecorderLocked();
|
||||
|
|
|
@ -28,7 +28,6 @@ public class AttachmentKeyboard extends FrameLayout implements InputAwareLayout.
|
|||
|
||||
private static final List<AttachmentKeyboardButton> DEFAULT_BUTTONS = Arrays.asList(
|
||||
AttachmentKeyboardButton.GALLERY,
|
||||
AttachmentKeyboardButton.GIF,
|
||||
AttachmentKeyboardButton.FILE,
|
||||
AttachmentKeyboardButton.PAYMENT,
|
||||
AttachmentKeyboardButton.CONTACT,
|
||||
|
|
|
@ -8,7 +8,6 @@ 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),
|
||||
|
|
|
@ -84,6 +84,7 @@ import com.bumptech.glide.load.engine.DiskCacheStrategy;
|
|||
import com.bumptech.glide.request.target.CustomTarget;
|
||||
import com.bumptech.glide.request.transition.Transition;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
|
||||
import org.greenrobot.eventbus.EventBus;
|
||||
import org.greenrobot.eventbus.Subscribe;
|
||||
|
@ -1103,10 +1104,7 @@ public class ConversationActivity extends PassphraseRequiredActivity
|
|||
case GALLERY:
|
||||
AttachmentManager.selectGallery(this, MEDIA_SENDER, recipient.get(), composeText.getTextTrimmed(), sendButton.getSelectedTransport());
|
||||
break;
|
||||
case GIF:
|
||||
AttachmentManager.selectGif(this, PICK_GIF, !isSecureText);
|
||||
break;
|
||||
case FILE:
|
||||
case FILE:
|
||||
AttachmentManager.selectDocument(this, PICK_DOCUMENT);
|
||||
break;
|
||||
case CONTACT:
|
||||
|
@ -1424,6 +1422,16 @@ 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();
|
||||
|
|
|
@ -12,6 +12,7 @@ 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) {
|
||||
|
@ -54,4 +55,12 @@ 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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="32dp"
|
||||
android:height="32dp"
|
||||
android:viewportWidth="32"
|
||||
android:viewportHeight="32">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M10.1,20.65a4.21,4.21 0,0 1,-2.2 -0.56,3.88 3.88,0 0,1 -1.45,-1.6A5.42,5.42 0,0 1,5.93 16a5.31,5.31 0,0 1,0.54 -2.48A3.81,3.81 0,0 1,8 11.92a4.49,4.49 0,0 1,2.28 -0.57,4.37 4.37,0 0,1 2.28,0.52 3.51,3.51 0,0 1,1.38 1.61l-1.35,0.64A2.08,2.08 0,0 0,11.74 13a2.59,2.59 0,0 0,-1.45 -0.38,2.69 2.69,0 0,0 -1.48,0.4 2.61,2.61 0,0 0,-1 1.15A4.27,4.27 0,0 0,7.46 16a4.81,4.81 0,0 0,0.32 1.84,2.36 2.36,0 0,0 1,1.15 2.83,2.83 0,0 0,1.56 0.4,3.21 3.21,0 0,0 1,-0.13 2.36,2.36 0,0 0,0.76 -0.38,1.85 1.85,0 0,0 0.52,-0.65 2.16,2.16 0,0 0,0.18 -0.92v-0.26L10.07,17.05L10.07,15.86L14,15.86v4.65L12.91,20.51l-0.09,-1.82 0.28,0.14A2.67,2.67 0,0 1,12 20.17,3.51 3.51,0 0,1 10.1,20.65ZM17.46,11.5v9L16,20.5v-9ZM26,12.74L21,12.74v2.63h4v1.26L21,16.63v3.88L19.5,20.51v-9L26,11.51ZM22.31,3.5c2.55,0 3.23,0.26 3.91,0.62a4,4 0,0 1,1.66 1.66c0.36,0.68 0.62,1.36 0.62,3.91L28.5,22.31c0,2.55 -0.26,3.23 -0.62,3.91a4,4 0,0 1,-1.66 1.66c-0.68,0.36 -1.36,0.62 -3.91,0.62L9.69,28.5c-2.55,0 -3.23,-0.26 -3.91,-0.62a4,4 0,0 1,-1.66 -1.66c-0.36,-0.68 -0.62,-1.36 -0.62,-3.91L3.5,9.69c0,-2.55 0.26,-3.23 0.62,-3.91A4,4 0,0 1,5.78 4.12c0.68,-0.36 1.36,-0.62 3.91,-0.62L22.31,3.5m0,-1.5L9.69,2C7,2 6.05,2.28 5.07,2.8A5.52,5.52 0,0 0,2.8 5.07C2.28,6.05 2,7 2,9.69L2,22.31c0,2.67 0.28,3.64 0.8,4.62A5.52,5.52 0,0 0,5.07 29.2c1,0.52 1.95,0.8 4.62,0.8L22.31,30c2.67,0 3.64,-0.28 4.62,-0.8a5.52,5.52 0,0 0,2.27 -2.27c0.52,-1 0.8,-1.95 0.8,-4.62L30,9.69c0,-2.67 -0.28,-3.64 -0.8,-4.62A5.52,5.52 0,0 0,26.93 2.8C26,2.28 25,2 22.31,2Z"/>
|
||||
</vector>
|
|
@ -287,6 +287,10 @@
|
|||
|
||||
<string name="ConversationActivity__reported_as_spam_and_blocked">Reported as spam and blocked.</string>
|
||||
|
||||
<string name="ConversationActivity_gifs_have_moved">GIFs have moved</string>
|
||||
<string name="ConversationActivity_look_for_gifs_next_to_emoji_and_stickers">Look for GIFs next to emoji and stickers.</string>
|
||||
<string name="ConversationActivity__gifs_are_now_here">GIFs are now here.</string>
|
||||
|
||||
<!-- ConversationAdapter -->
|
||||
<plurals name="ConversationAdapter_n_unread_messages">
|
||||
<item quantity="one">%d unread message</item>
|
||||
|
|
Ładowanie…
Reference in New Issue