Refind input menu ( #236 )

This commit is contained in:
世界 2020-11-10 07:02:08 +00:00
parent 0c0bfc4523
commit 7d6ad8ab62
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
3 changed files with 444 additions and 288 deletions

View File

@ -2,8 +2,8 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android' apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-android-extensions'
def verName = "7.2.1-rc04" def verName = "7.2.1-rc05"
def verCode = 110 def verCode = 112
def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json") def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json")

View File

@ -35,6 +35,7 @@ import android.graphics.PorterDuffColorFilter;
import android.graphics.Rect; import android.graphics.Rect;
import android.graphics.RectF; import android.graphics.RectF;
import android.graphics.drawable.Drawable; import android.graphics.drawable.Drawable;
import android.graphics.drawable.TransitionDrawable;
import android.media.AudioManager; import android.media.AudioManager;
import android.os.Build; import android.os.Build;
import android.os.Bundle; import android.os.Bundle;
@ -327,8 +328,6 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
private Drawable sendButtonDrawable; private Drawable sendButtonDrawable;
private Drawable inactinveSendButtonDrawable; private Drawable inactinveSendButtonDrawable;
private Drawable sendButtonInverseDrawable; private Drawable sendButtonInverseDrawable;
private ActionBarPopupWindow sendPopupWindow;
private ActionBarPopupWindow.ActionBarPopupWindowLayout sendPopupLayout;
private ImageView cancelBotButton; private ImageView cancelBotButton;
private ImageView[] emojiButton = new ImageView[2]; private ImageView[] emojiButton = new ImageView[2];
@SuppressWarnings("FieldCanBeLocal") @SuppressWarnings("FieldCanBeLocal")
@ -2729,10 +2728,13 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
audioSendButton.setImageResource(!NekoConfig.useChatAttachMediaMenu ? R.drawable.input_mic : R.drawable.ic_ab_other); audioSendButton.setImageResource(!NekoConfig.useChatAttachMediaMenu ? R.drawable.input_mic : R.drawable.ic_ab_other);
audioSendButton.setPadding(0, 0, AndroidUtilities.dp(4), 0); audioSendButton.setPadding(0, 0, AndroidUtilities.dp(4), 0);
audioSendButton.setContentDescription(!NekoConfig.useChatAttachMediaMenu ? audioSendButton.setContentDescription(!NekoConfig.useChatAttachMediaMenu ?
LocaleController.getString("AccDescrVoiceMessage", R.string.AccDescrVoiceMessage) LocaleController.getString("AccDescrVoiceMessage", R.string.AccDescrVoiceMessage) :
:
LocaleController.getString("AccDescrChatAttachEnterMenu", R.string.AccDescrChatAttachEnterMenu)); LocaleController.getString("AccDescrChatAttachEnterMenu", R.string.AccDescrChatAttachEnterMenu));
if (Build.VERSION.SDK_INT >= 21 && NekoConfig.useChatAttachMediaMenu) {
attachButton.setBackgroundDrawable(Theme.createSelectorDrawable(Theme.getColor(Theme.key_listSelector)));
}
audioSendButton.setFocusable(true); audioSendButton.setFocusable(true);
audioSendButton.setAccessibilityDelegate(mediaMessageButtonsDelegate); audioSendButton.setAccessibilityDelegate(mediaMessageButtonsDelegate);
audioVideoButtonContainer.addView(audioSendButton, LayoutHelper.createFrame(48, 48)); audioVideoButtonContainer.addView(audioSendButton, LayoutHelper.createFrame(48, 48));
@ -3092,16 +3094,34 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
return false; return false;
} }
private ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayout; private ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayoutDefault;
private ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayoutInput;
private ActionBarPopupWindow menuPopupWindowDefault;
private ActionBarPopupWindow menuPopupWindowInput;
private ActionBarPopupWindow menuPopupWindow; private ActionBarPopupWindow menuPopupWindow;
private boolean isInInput;
private void onMenuClick(View view) { private void onMenuClick(View view) {
if (parentFragment == null) { if (parentFragment == null) {
return; return;
} }
ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayout;
if (isInInput) {
menuPopupLayout = menuPopupLayoutInput;
menuPopupWindow = menuPopupWindowInput;
} else {
menuPopupLayout = menuPopupLayoutDefault;
menuPopupWindow = menuPopupWindowDefault;
}
if (menuPopupLayout == null) { if (menuPopupLayout == null) {
menuPopupLayout = new ActionBarPopupWindow.ActionBarPopupWindowLayout(parentActivity); menuPopupLayout = new ActionBarPopupWindow.ActionBarPopupWindowLayout(parentActivity);
if (isInInput) {
menuPopupLayoutInput = menuPopupLayout;
} else {
menuPopupLayoutDefault = menuPopupLayout;
}
menuPopupLayout.setAnimationEnabled(false); menuPopupLayout.setAnimationEnabled(false);
menuPopupLayout.setOnTouchListener(new OnTouchListener() { menuPopupLayout.setOnTouchListener(new OnTouchListener() {
@ -3125,55 +3145,119 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getContext()); ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getContext());
cell.setTextAndIcon(LocaleController.getString("ChatAttachEnterMenuRecordAudio", R.string.ChatAttachEnterMenuRecordAudio), R.drawable.input_mic); if (!isInInput) {
cell.setOnClickListener(v -> {
if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
menuPopupWindow.dismiss();
}
if (parentFragment != null) { cell.setTextAndIcon(LocaleController.getString("ChatAttachEnterMenuRecordAudio", R.string.ChatAttachEnterMenuRecordAudio), R.drawable.input_mic);
TLRPC.Chat chat = parentFragment.getCurrentChat(); cell.setOnClickListener(v -> {
if (chat != null && !ChatObject.canSendMedia(chat)) { if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
delegate.needShowMediaBanHint(); menuPopupWindow.dismiss();
return;
} }
}
videoSendButton.setTag(null); if (parentFragment != null) {
recordAudioVideoRunnable.run(); TLRPC.Chat chat = parentFragment.getCurrentChat();
recordCircle.sendButtonVisible = true; if (chat != null && !ChatObject.canSendMedia(chat)) {
startLockTransition(false); delegate.needShowMediaBanHint();
return;
}); }
cell.setMinimumWidth(AndroidUtilities.dp(196));
menuPopupLayout.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 48 * a++, 0, 0));
cell = new ActionBarMenuSubItem(getContext());
cell.setTextAndIcon(LocaleController.getString("ChatAttachEnterMenuRecordVideo", R.string.ChatAttachEnterMenuRecordVideo), R.drawable.input_video);
cell.setOnClickListener(v -> {
if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
menuPopupWindow.dismiss();
}
if (parentFragment != null) {
TLRPC.Chat chat = parentFragment.getCurrentChat();
if (chat != null && !ChatObject.canSendMedia(chat)) {
delegate.needShowMediaBanHint();
return;
} }
videoSendButton.setTag(null);
recordAudioVideoRunnable.run();
recordCircle.sendButtonVisible = true;
startLockTransition(false);
});
cell.setMinimumWidth(AndroidUtilities.dp(196));
menuPopupLayout.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 48 * a++, 0, 0));
cell = new ActionBarMenuSubItem(getContext());
cell.setTextAndIcon(LocaleController.getString("ChatAttachEnterMenuRecordVideo", R.string.ChatAttachEnterMenuRecordVideo), R.drawable.input_video);
cell.setOnClickListener(v -> {
if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
menuPopupWindow.dismiss();
}
if (parentFragment != null) {
TLRPC.Chat chat = parentFragment.getCurrentChat();
if (chat != null && !ChatObject.canSendMedia(chat)) {
delegate.needShowMediaBanHint();
return;
}
}
videoSendButton.setTag(1);
recordAudioVideoRunnable.run();
recordCircle.sendButtonVisible = true;
startLockTransition(false);
});
cell.setMinimumWidth(AndroidUtilities.dp(196));
menuPopupLayout.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 48 * a++, 0, 0));
} else {
if (StrUtil.isNotBlank(NekoConfig.openPGPApp)) {
cell.setTextAndIcon(LocaleController.getString("Sign", R.string.Sign), R.drawable.baseline_vpn_key_24);
cell.setOnClickListener(v -> {
if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
menuPopupWindow.dismiss();
}
signComment(true);
});
cell.setOnLongClickListener(v -> {
if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
menuPopupWindow.dismiss();
}
signComment(false);
return true;
});
cell.setMinimumWidth(AndroidUtilities.dp(196));
menuPopupLayout.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 48 * a++, 0, 0));
cell = new ActionBarMenuSubItem(getContext());
} }
videoSendButton.setTag(1); TLRPC.Chat chat = parentFragment.getCurrentChat();
recordAudioVideoRunnable.run(); TLRPC.User user = parentFragment.getCurrentUser();
recordCircle.sendButtonVisible = true;
startLockTransition(false);
}); int chatId;
if (chat != null) {
chatId = chat.id;
} else if (user != null) {
chatId = user.id;
} else {
chatId = -1;
}
cell.setMinimumWidth(AndroidUtilities.dp(196)); cell.setTextAndIcon(LocaleController.getString("Translate", R.string.Translate), R.drawable.ic_translate);
menuPopupLayout.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 48 * a++, 0, 0)); cell.setOnClickListener(v -> {
if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
menuPopupWindow.dismiss();
}
translateComment(TranslateDb.getChatLanguage(chatId, TranslatorKt.getCode2Locale(NekoConfig.translateInputLang)));
});
ActionBarMenuSubItem finalCell = cell;
cell.setOnLongClickListener(v -> {
Translator.showTargetLangSelect(finalCell, true, (locale) -> {
if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
menuPopupWindow.dismiss();
}
translateComment(locale);
TranslateDb.saveChatLanguage(chatId, locale);
return Unit.INSTANCE;
});
return true;
});
cell.setMinimumWidth(AndroidUtilities.dp(196));
menuPopupLayout.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 48 * a++, 0, 0));
}
int dlps = delegate.getDisableLinkPreviewStatus(); int dlps = delegate.getDisableLinkPreviewStatus();
if (dlps > 0) { if (dlps > 0) {
@ -3213,6 +3297,12 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
menuPopupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED); menuPopupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED);
menuPopupWindow.getContentView().setFocusableInTouchMode(true); menuPopupWindow.getContentView().setFocusableInTouchMode(true);
if (isInInput) {
menuPopupWindowInput = menuPopupWindow;
} else {
menuPopupWindowDefault = menuPopupWindow;
}
if (delegate != null) { if (delegate != null) {
delegate.onSendLongClick(); delegate.onSendLongClick();
} }
@ -3229,11 +3319,18 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
y = location[1] - menuPopupLayout.getMeasuredHeight() - AndroidUtilities.dp(2); y = location[1] - menuPopupLayout.getMeasuredHeight() - AndroidUtilities.dp(2);
} }
y += AndroidUtilities.dp(48); y += AndroidUtilities.dp(48);
menuPopupWindow.showAtLocation(view, Gravity.LEFT | Gravity.TOP, location[0] + view.getMeasuredWidth() - menuPopupLayout.getMeasuredWidth() + AndroidUtilities.dp(8), y); int x = location[0] + view.getMeasuredWidth() - menuPopupLayout.getMeasuredWidth() + AndroidUtilities.dp(8);
if (isInInput) {
x += view.getMeasuredWidth();
}
menuPopupWindow.showAtLocation(view, Gravity.LEFT | Gravity.TOP, x, y);
menuPopupWindow.dimBehind(); menuPopupWindow.dimBehind();
} }
private ActionBarPopupWindow sendPopupWindow;
private ActionBarPopupWindow.ActionBarPopupWindowLayout sendPopupLayout;
private boolean onSendLongClick(View view) { private boolean onSendLongClick(View view) {
if (parentFragment == null || isInScheduleMode()) { if (parentFragment == null || isInScheduleMode()) {
return false; return false;
@ -3281,53 +3378,6 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getContext()); ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getContext());
if (StrUtil.isNotBlank(NekoConfig.openPGPApp)) {
cell.setTextAndIcon(LocaleController.getString("Sign", R.string.Sign), R.drawable.baseline_vpn_key_24);
cell.setOnClickListener(v -> {
if (sendPopupWindow != null && sendPopupWindow.isShowing()) {
sendPopupWindow.dismiss();
}
signComment(true);
});
cell.setOnLongClickListener(v -> {
if (sendPopupWindow != null && sendPopupWindow.isShowing()) {
sendPopupWindow.dismiss();
}
signComment(false);
return true;
});
cell.setMinimumWidth(AndroidUtilities.dp(196));
sendPopupLayout.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 48 * a++, 0, 0));
cell = new ActionBarMenuSubItem(getContext());
}
cell.setTextAndIcon(LocaleController.getString("Translate", R.string.Translate), R.drawable.ic_translate);
cell.setOnClickListener(v -> {
if (sendPopupWindow != null && sendPopupWindow.isShowing()) {
sendPopupWindow.dismiss();
}
translateComment(TranslateDb.getChatLanguage(chatId, TranslatorKt.getCode2Locale(NekoConfig.translateInputLang)));
});
ActionBarMenuSubItem finalCell = cell;
cell.setOnLongClickListener(v -> {
Translator.showTargetLangSelect(finalCell, true, (locale) -> {
if (sendPopupWindow != null && sendPopupWindow.isShowing()) {
sendPopupWindow.dismiss();
}
translateComment(locale);
TranslateDb.saveChatLanguage(chatId, locale);
return Unit.INSTANCE;
});
return true;
});
cell.setMinimumWidth(AndroidUtilities.dp(196));
sendPopupLayout.addView(cell, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, LocaleController.isRTL ? Gravity.RIGHT : Gravity.LEFT, 0, 48 * a++, 0, 0));
if (parentFragment.canScheduleMessage()) { if (parentFragment.canScheduleMessage()) {
cell = new ActionBarMenuSubItem(getContext()); cell = new ActionBarMenuSubItem(getContext());
if (UserObject.isUserSelf(user)) { if (UserObject.isUserSelf(user)) {
@ -3533,14 +3583,15 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
if (videoSendButton == null) { if (videoSendButton == null) {
return; return;
} }
if (NekoConfig.useChatAttachMediaMenu) visible = animated = false;
videoSendButton.setTag(visible ? 1 : null); videoSendButton.setTag(visible ? 1 : null);
if (audioVideoButtonAnimation != null) { if (audioVideoButtonAnimation != null) {
audioVideoButtonAnimation.cancel(); audioVideoButtonAnimation.cancel();
audioVideoButtonAnimation = null; audioVideoButtonAnimation = null;
} }
if (NekoConfig.useChatAttachMediaMenu) visible = animated = false;
if (animated) { if (animated) {
SharedPreferences preferences = MessagesController.getGlobalMainSettings(); SharedPreferences preferences = MessagesController.getGlobalMainSettings();
boolean isChannel = false; boolean isChannel = false;
@ -4236,6 +4287,59 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
return messageWebPageSearch; return messageWebPageSearch;
} }
private void setImageDrawableWithAnimation(ImageView imageView, int fromRes, int targetRes, int duration) {
Drawable currentDrawable = imageView.getDrawable();
if (currentDrawable == null) {
imageView.setImageResource(targetRes);
return;
}
TransitionDrawable transitionDrawable = new TransitionDrawable(new Drawable[]{
parentActivity.getResources().getDrawable(fromRes),
parentActivity.getResources().getDrawable(targetRes)
});
transitionDrawable.setCrossFadeEnabled(true);
imageView.setImageDrawable(transitionDrawable);
imageView.post(() -> transitionDrawable.startTransition(duration));
}
private void checkAttachButton(boolean use, int duration) {
int fromRes;
int targetRes;
isInInput = use;
if (use) {
if (duration == 0) botButton.setVisibility(View.GONE);
fromRes = R.drawable.deproko_baseline_attach_26;
targetRes = R.drawable.ic_ab_other;
attachButton.setOnClickListener(this::onMenuClick);
attachButton.setContentDescription(LocaleController.getString("AccDescrAttachButton", R.string.AccDescrChatAttachEnterMenu));
} else {
if (duration == 0) botButton.setVisibility(View.VISIBLE);
fromRes = R.drawable.ic_ab_other;
targetRes = R.drawable.deproko_baseline_attach_26;
attachButton.setOnClickListener(v -> {
if (adjustPanLayoutHelper != null && adjustPanLayoutHelper.animationInProgress()) {
return;
}
delegate.didPressAttachButton();
});
attachButton.setContentDescription(LocaleController.getString("AccDescrAttachButton", R.string.AccDescrAttachButton));
}
if (duration == 0) {
attachButton.setImageResource(targetRes);
} else {
setImageDrawableWithAnimation(attachButton, fromRes, targetRes, duration);
}
}
private void hideRecordedAudioPanel(boolean wasSent) { private void hideRecordedAudioPanel(boolean wasSent) {
if (recordPannelAnimation != null && recordPannelAnimation.isRunning()) { if (recordPannelAnimation != null && recordPannelAnimation.isRunning()) {
return; return;
@ -4321,21 +4425,22 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
} }
exitAnimation.setDuration(200); exitAnimation.setDuration(200);
AnimatorSet attachIconAnimator; AnimatorSet attachIconAnimator = null;
if (attachButton != null) { if (attachButton != null) {
attachButton.setAlpha(0f); checkAttachButton(false, 150);
attachButton.setScaleX(0); if (!attachButton.isShown()) {
attachButton.setScaleY(0); attachButton.setAlpha(0f);
attachButton.setScaleX(0);
attachButton.setScaleY(0);
attachIconAnimator = new AnimatorSet(); attachIconAnimator = new AnimatorSet();
attachIconAnimator.playTogether( attachIconAnimator.playTogether(
ObjectAnimator.ofFloat(attachButton, View.ALPHA, 1.0f), ObjectAnimator.ofFloat(attachButton, View.ALPHA, 1.0f),
ObjectAnimator.ofFloat(attachButton, View.SCALE_X, 1.0f), ObjectAnimator.ofFloat(attachButton, View.SCALE_X, 1.0f),
ObjectAnimator.ofFloat(attachButton, View.SCALE_Y, 1.0f) ObjectAnimator.ofFloat(attachButton, View.SCALE_Y, 1.0f)
); );
attachIconAnimator.setDuration(150); attachIconAnimator.setDuration(150);
} else { }
attachIconAnimator = null;
} }
emojiButton[0].setAlpha(0f); emojiButton[0].setAlpha(0f);
@ -4538,147 +4643,162 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
} }
if (attachLayout != null) { if (attachLayout != null) {
runningAnimation2 = new AnimatorSet(); if (!NekoConfig.useChatAttachMediaMenu) {
ArrayList<Animator> animators = new ArrayList<>(); runningAnimation2 = new AnimatorSet();
animators.add(ObjectAnimator.ofFloat(attachLayout, View.ALPHA, 0.0f)); ArrayList<Animator> animators = new ArrayList<>();
animators.add(ObjectAnimator.ofFloat(attachLayout, View.SCALE_X, 0.0f)); animators.add(ObjectAnimator.ofFloat(attachLayout, View.ALPHA, 0.0f));
scheduleButtonHidden = false; animators.add(ObjectAnimator.ofFloat(attachLayout, View.SCALE_X, 0.0f));
boolean hasScheduled = delegate != null && delegate.hasScheduledMessages(); scheduleButtonHidden = false;
if (scheduledButton != null) { boolean hasScheduled = delegate != null && delegate.hasScheduledMessages();
scheduledButton.setScaleY(1.0f); if (scheduledButton != null) {
if (hasScheduled) { scheduledButton.setScaleY(1.0f);
scheduledButton.setVisibility(VISIBLE); if (hasScheduled) {
scheduledButton.setTag(1); scheduledButton.setVisibility(VISIBLE);
scheduledButton.setPivotX(AndroidUtilities.dp(48)); scheduledButton.setTag(1);
animators.add(ObjectAnimator.ofFloat(scheduledButton, View.TRANSLATION_X, AndroidUtilities.dp(botButton != null && botButton.getVisibility() == VISIBLE ? 96 : 48))); scheduledButton.setPivotX(AndroidUtilities.dp(48));
animators.add(ObjectAnimator.ofFloat(scheduledButton, View.ALPHA, 1.0f)); animators.add(ObjectAnimator.ofFloat(scheduledButton, View.TRANSLATION_X, AndroidUtilities.dp(botButton != null && botButton.getVisibility() == VISIBLE ? 96 : 48)));
animators.add(ObjectAnimator.ofFloat(scheduledButton, View.SCALE_X, 1.0f)); animators.add(ObjectAnimator.ofFloat(scheduledButton, View.ALPHA, 1.0f));
} else { animators.add(ObjectAnimator.ofFloat(scheduledButton, View.SCALE_X, 1.0f));
scheduledButton.setTranslationX(AndroidUtilities.dp(botButton != null && botButton.getVisibility() == VISIBLE ? 96 : 48)); } else {
scheduledButton.setAlpha(1.0f); scheduledButton.setTranslationX(AndroidUtilities.dp(botButton != null && botButton.getVisibility() == VISIBLE ? 96 : 48));
scheduledButton.setScaleX(1.0f); scheduledButton.setAlpha(1.0f);
scheduledButton.setScaleX(1.0f);
}
} }
runningAnimation2.playTogether(animators);
runningAnimation2.setDuration(100);
runningAnimation2.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
if (animation.equals(runningAnimation2)) {
attachLayout.setVisibility(GONE);
runningAnimation2 = null;
}
}
@Override
public void onAnimationCancel(Animator animation) {
if (animation.equals(runningAnimation2)) {
runningAnimation2 = null;
}
}
});
runningAnimation2.start();
updateFieldRight(0);
if (delegate != null && getVisibility() == VISIBLE) {
delegate.onAttachButtonHidden();
}
} else {
checkAttachButton(true, 150);
updateFieldRight(1);
} }
runningAnimation2.playTogether(animators);
runningAnimation2.setDuration(100); runningAnimationType = 5;
runningAnimation2.addListener(new AnimatorListenerAdapter() { runningAnimation = new AnimatorSet();
ArrayList<Animator> animators = new ArrayList<>();
if (botButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(botButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(botButton, View.SCALE_Y, 0.1f));
animators.add(ObjectAnimator.ofFloat(botButton, View.ALPHA, 0.0f));
} else if (audioVideoButtonContainer.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_Y, 0.1f));
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.ALPHA, 0.0f));
}
if (expandStickersButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.SCALE_Y, 0.1f));
animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.ALPHA, 0.0f));
}
if (sendButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(sendButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(sendButton, View.SCALE_Y, 0.1f));
animators.add(ObjectAnimator.ofFloat(sendButton, View.ALPHA, 0.0f));
}
if (cancelBotButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_Y, 0.1f));
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.ALPHA, 0.0f));
}
animators.add(ObjectAnimator.ofFloat(slowModeButton, View.SCALE_X, 1.0f));
animators.add(ObjectAnimator.ofFloat(slowModeButton, View.SCALE_Y, 1.0f));
animators.add(ObjectAnimator.ofFloat(slowModeButton, View.ALPHA, 1.0f));
setSlowModeButtonVisible(true);
runningAnimation.playTogether(animators);
runningAnimation.setDuration(150);
runningAnimation.addListener(new AnimatorListenerAdapter() {
@Override @Override
public void onAnimationEnd(Animator animation) { public void onAnimationEnd(Animator animation) {
if (animation.equals(runningAnimation2)) { if (animation.equals(runningAnimation)) {
attachLayout.setVisibility(GONE); sendButton.setVisibility(GONE);
runningAnimation2 = null; cancelBotButton.setVisibility(GONE);
audioVideoButtonContainer.setVisibility(GONE);
expandStickersButton.setVisibility(GONE);
runningAnimation = null;
runningAnimationType = 0;
} }
} }
@Override @Override
public void onAnimationCancel(Animator animation) { public void onAnimationCancel(Animator animation) {
if (animation.equals(runningAnimation2)) { if (animation.equals(runningAnimation)) {
runningAnimation2 = null; runningAnimation = null;
} }
} }
}); });
runningAnimation2.start(); runningAnimation.start();
updateFieldRight(0); } else {
if (delegate != null && getVisibility() == VISIBLE) { slowModeButton.setScaleX(1.0f);
delegate.onAttachButtonHidden(); slowModeButton.setScaleY(1.0f);
slowModeButton.setAlpha(1.0f);
setSlowModeButtonVisible(true);
audioVideoButtonContainer.setScaleX(0.1f);
audioVideoButtonContainer.setScaleY(0.1f);
audioVideoButtonContainer.setAlpha(0.0f);
audioVideoButtonContainer.setVisibility(GONE);
sendButton.setScaleX(0.1f);
sendButton.setScaleY(0.1f);
sendButton.setAlpha(0.0f);
sendButton.setVisibility(GONE);
cancelBotButton.setScaleX(0.1f);
cancelBotButton.setScaleY(0.1f);
cancelBotButton.setAlpha(0.0f);
cancelBotButton.setVisibility(GONE);
if (expandStickersButton.getVisibility() == VISIBLE) {
expandStickersButton.setScaleX(0.1f);
expandStickersButton.setScaleY(0.1f);
expandStickersButton.setAlpha(0.0f);
expandStickersButton.setVisibility(GONE);
} }
} if (attachLayout != null) {
if (!NekoConfig.useChatAttachMediaMenu) {
runningAnimationType = 5; attachLayout.setVisibility(GONE);
runningAnimation = new AnimatorSet(); if (delegate != null && getVisibility() == VISIBLE) {
delegate.onAttachButtonHidden();
ArrayList<Animator> animators = new ArrayList<>(); }
if (audioVideoButtonContainer.getVisibility() == VISIBLE) { updateFieldRight(0);
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_X, 0.1f)); } else {
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_Y, 0.1f)); checkAttachButton(true, 0);
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.ALPHA, 0.0f)); updateFieldRight(1);
}
if (expandStickersButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.SCALE_Y, 0.1f));
animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.ALPHA, 0.0f));
}
if (sendButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(sendButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(sendButton, View.SCALE_Y, 0.1f));
animators.add(ObjectAnimator.ofFloat(sendButton, View.ALPHA, 0.0f));
}
if (cancelBotButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_Y, 0.1f));
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.ALPHA, 0.0f));
}
animators.add(ObjectAnimator.ofFloat(slowModeButton, View.SCALE_X, 1.0f));
animators.add(ObjectAnimator.ofFloat(slowModeButton, View.SCALE_Y, 1.0f));
animators.add(ObjectAnimator.ofFloat(slowModeButton, View.ALPHA, 1.0f));
setSlowModeButtonVisible(true);
runningAnimation.playTogether(animators);
runningAnimation.setDuration(150);
runningAnimation.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
if (animation.equals(runningAnimation)) {
sendButton.setVisibility(GONE);
cancelBotButton.setVisibility(GONE);
audioVideoButtonContainer.setVisibility(GONE);
expandStickersButton.setVisibility(GONE);
runningAnimation = null;
runningAnimationType = 0;
} }
} }
scheduleButtonHidden = false;
@Override if (scheduledButton != null) {
public void onAnimationCancel(Animator animation) { if (delegate != null && delegate.hasScheduledMessages()) {
if (animation.equals(runningAnimation)) { scheduledButton.setVisibility(VISIBLE);
runningAnimation = null; scheduledButton.setTag(1);
} }
scheduledButton.setTranslationX(AndroidUtilities.dp(botButton != null && botButton.getVisibility() == VISIBLE ? 96 : 48));
scheduledButton.setAlpha(1.0f);
scheduledButton.setScaleX(1.0f);
scheduledButton.setScaleY(1.0f);
} }
});
runningAnimation.start();
} else {
slowModeButton.setScaleX(1.0f);
slowModeButton.setScaleY(1.0f);
slowModeButton.setAlpha(1.0f);
setSlowModeButtonVisible(true);
audioVideoButtonContainer.setScaleX(0.1f);
audioVideoButtonContainer.setScaleY(0.1f);
audioVideoButtonContainer.setAlpha(0.0f);
audioVideoButtonContainer.setVisibility(GONE);
sendButton.setScaleX(0.1f);
sendButton.setScaleY(0.1f);
sendButton.setAlpha(0.0f);
sendButton.setVisibility(GONE);
cancelBotButton.setScaleX(0.1f);
cancelBotButton.setScaleY(0.1f);
cancelBotButton.setAlpha(0.0f);
cancelBotButton.setVisibility(GONE);
if (expandStickersButton.getVisibility() == VISIBLE) {
expandStickersButton.setScaleX(0.1f);
expandStickersButton.setScaleY(0.1f);
expandStickersButton.setAlpha(0.0f);
expandStickersButton.setVisibility(GONE);
}
if (attachLayout != null) {
attachLayout.setVisibility(GONE);
if (delegate != null && getVisibility() == VISIBLE) {
delegate.onAttachButtonHidden();
}
updateFieldRight(0);
}
scheduleButtonHidden = false;
if (scheduledButton != null) {
if (delegate != null && delegate.hasScheduledMessages()) {
scheduledButton.setVisibility(VISIBLE);
scheduledButton.setTag(1);
}
scheduledButton.setTranslationX(AndroidUtilities.dp(botButton != null && botButton.getVisibility() == VISIBLE ? 96 : 48));
scheduledButton.setAlpha(1.0f);
scheduledButton.setScaleX(1.0f);
scheduledButton.setScaleY(1.0f);
} }
} }
} }
@ -4708,56 +4828,67 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
} }
if (attachLayout != null) { if (attachLayout != null) {
runningAnimation2 = new AnimatorSet();
ArrayList<Animator> animators = new ArrayList<>();
animators.add(ObjectAnimator.ofFloat(attachLayout, View.ALPHA, 0.0f));
animators.add(ObjectAnimator.ofFloat(attachLayout, View.SCALE_X, 0.0f));
boolean hasScheduled = delegate != null && delegate.hasScheduledMessages();
scheduleButtonHidden = true;
if (scheduledButton != null) {
scheduledButton.setScaleY(1.0f);
if (hasScheduled) {
scheduledButton.setTag(null);
animators.add(ObjectAnimator.ofFloat(scheduledButton, View.ALPHA, 0.0f));
animators.add(ObjectAnimator.ofFloat(scheduledButton, View.SCALE_X, 0.0f));
animators.add(ObjectAnimator.ofFloat(scheduledButton, View.TRANSLATION_X, AndroidUtilities.dp(botButton == null || botButton.getVisibility() == GONE ? 48 : 96)));
} else {
scheduledButton.setAlpha(0.0f);
scheduledButton.setScaleX(0.0f);
scheduledButton.setTranslationX(AndroidUtilities.dp(botButton == null || botButton.getVisibility() == GONE ? 48 : 96));
}
}
runningAnimation2.playTogether(animators);
runningAnimation2.setDuration(100);
runningAnimation2.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animation) {
if (animation.equals(runningAnimation2)) {
attachLayout.setVisibility(GONE);
if (hasScheduled) {
scheduledButton.setVisibility(GONE);
}
runningAnimation2 = null;
}
}
@Override if (!NekoConfig.useChatAttachMediaMenu) {
public void onAnimationCancel(Animator animation) { runningAnimation2 = new AnimatorSet();
if (animation.equals(runningAnimation2)) { ArrayList<Animator> animators = new ArrayList<>();
runningAnimation2 = null; animators.add(ObjectAnimator.ofFloat(attachLayout, View.ALPHA, 0.0f));
animators.add(ObjectAnimator.ofFloat(attachLayout, View.SCALE_X, 0.0f));
boolean hasScheduled = delegate != null && delegate.hasScheduledMessages();
scheduleButtonHidden = true;
if (scheduledButton != null) {
scheduledButton.setScaleY(1.0f);
if (hasScheduled) {
scheduledButton.setTag(null);
animators.add(ObjectAnimator.ofFloat(scheduledButton, View.ALPHA, 0.0f));
animators.add(ObjectAnimator.ofFloat(scheduledButton, View.SCALE_X, 0.0f));
animators.add(ObjectAnimator.ofFloat(scheduledButton, View.TRANSLATION_X, AndroidUtilities.dp(botButton == null || botButton.getVisibility() == GONE ? 48 : 96)));
} else {
scheduledButton.setAlpha(0.0f);
scheduledButton.setScaleX(0.0f);
scheduledButton.setTranslationX(AndroidUtilities.dp(botButton == null || botButton.getVisibility() == GONE ? 48 : 96));
} }
} }
}); runningAnimation2.playTogether(animators);
runningAnimation2.start(); runningAnimation2.setDuration(100);
updateFieldRight(0); runningAnimation2.addListener(new AnimatorListenerAdapter() {
if (delegate != null && getVisibility() == VISIBLE) { @Override
delegate.onAttachButtonHidden(); public void onAnimationEnd(Animator animation) {
if (animation.equals(runningAnimation2)) {
attachLayout.setVisibility(GONE);
if (hasScheduled) {
scheduledButton.setVisibility(GONE);
}
runningAnimation2 = null;
}
}
@Override
public void onAnimationCancel(Animator animation) {
if (animation.equals(runningAnimation2)) {
runningAnimation2 = null;
}
}
});
runningAnimation2.start();
updateFieldRight(0);
if (delegate != null && getVisibility() == VISIBLE) {
delegate.onAttachButtonHidden();
}
} else {
checkAttachButton(true, 150);
updateFieldRight(1);
} }
} }
runningAnimation = new AnimatorSet(); runningAnimation = new AnimatorSet();
ArrayList<Animator> animators = new ArrayList<>(); ArrayList<Animator> animators = new ArrayList<>();
if (botButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(botButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(botButton, View.SCALE_Y, 0.1f));
animators.add(ObjectAnimator.ofFloat(botButton, View.ALPHA, 0.0f));
}
if (audioVideoButtonContainer.getVisibility() == VISIBLE) { if (audioVideoButtonContainer.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_X, 0.1f)); animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_Y, 0.1f)); animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_Y, 0.1f));
@ -4862,11 +4993,16 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
expandStickersButton.setVisibility(GONE); expandStickersButton.setVisibility(GONE);
} }
if (attachLayout != null) { if (attachLayout != null) {
attachLayout.setVisibility(GONE); if (!NekoConfig.useChatAttachMediaMenu) {
if (delegate != null && getVisibility() == VISIBLE) { attachLayout.setVisibility(GONE);
delegate.onAttachButtonHidden(); if (delegate != null && getVisibility() == VISIBLE) {
delegate.onAttachButtonHidden();
}
updateFieldRight(0);
} else {
checkAttachButton(true, 0);
updateFieldRight(1);
} }
updateFieldRight(0);
} }
scheduleButtonHidden = true; scheduleButtonHidden = true;
if (scheduledButton != null) { if (scheduledButton != null) {
@ -4937,6 +5073,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
} }
}); });
runningAnimation2.start(); runningAnimation2.start();
checkAttachButton(false, 150);
updateFieldRight(1); updateFieldRight(1);
if (getVisibility() == VISIBLE) { if (getVisibility() == VISIBLE) {
delegate.onAttachButtonShow(); delegate.onAttachButtonShow();
@ -4951,6 +5088,11 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.SCALE_X, 1.0f)); animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.SCALE_X, 1.0f));
animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.SCALE_Y, 1.0f)); animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.SCALE_Y, 1.0f));
animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.ALPHA, 1.0f)); animators.add(ObjectAnimator.ofFloat(expandStickersButton, View.ALPHA, 1.0f));
if (botButton.getVisibility() == GONE) {
animators.add(ObjectAnimator.ofFloat(botButton, View.SCALE_X, 1f));
animators.add(ObjectAnimator.ofFloat(botButton, View.SCALE_Y, 1f));
animators.add(ObjectAnimator.ofFloat(botButton, View.ALPHA, 1f));
}
if (cancelBotButton.getVisibility() == VISIBLE) { if (cancelBotButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_X, 0.1f)); animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_Y, 0.1f)); animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_Y, 0.1f));
@ -5019,6 +5161,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
delegate.onAttachButtonShow(); delegate.onAttachButtonShow();
} }
attachLayout.setVisibility(VISIBLE); attachLayout.setVisibility(VISIBLE);
checkAttachButton(false, 0);
updateFieldRight(1); updateFieldRight(1);
} }
scheduleButtonHidden = false; scheduleButtonHidden = false;
@ -5089,6 +5232,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
} }
}); });
runningAnimation2.start(); runningAnimation2.start();
checkAttachButton(false, 150);
updateFieldRight(1); updateFieldRight(1);
if (getVisibility() == VISIBLE) { if (getVisibility() == VISIBLE) {
delegate.onAttachButtonShow(); delegate.onAttachButtonShow();
@ -5103,6 +5247,11 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_X, 1.0f)); animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_X, 1.0f));
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_Y, 1.0f)); animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_Y, 1.0f));
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.ALPHA, 1.0f)); animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.ALPHA, 1.0f));
if (botButton.getVisibility() == GONE) {
animators.add(ObjectAnimator.ofFloat(botButton, View.SCALE_X, 1f));
animators.add(ObjectAnimator.ofFloat(botButton, View.SCALE_Y, 1f));
animators.add(ObjectAnimator.ofFloat(botButton, View.ALPHA, 1f));
}
if (cancelBotButton.getVisibility() == VISIBLE) { if (cancelBotButton.getVisibility() == VISIBLE) {
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_X, 0.1f)); animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_X, 0.1f));
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_Y, 0.1f)); animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_Y, 0.1f));
@ -5173,6 +5322,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
attachLayout.setAlpha(1.0f); attachLayout.setAlpha(1.0f);
attachLayout.setScaleX(1.0f); attachLayout.setScaleX(1.0f);
attachLayout.setVisibility(VISIBLE); attachLayout.setVisibility(VISIBLE);
checkAttachButton(false, 0);
updateFieldRight(1); updateFieldRight(1);
} }
scheduleButtonHidden = false; scheduleButtonHidden = false;
@ -5643,9 +5793,13 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
audioVideoButtonContainer.setScaleX(0); audioVideoButtonContainer.setScaleX(0);
audioVideoButtonContainer.setScaleY(0); audioVideoButtonContainer.setScaleY(0);
if (attachButton != null && attachButton.getVisibility() == View.VISIBLE) { if (attachButton != null) {
attachButton.setScaleX(0); if (NekoConfig.useChatAttachMediaMenu) {
attachButton.setScaleY(0); checkAttachButton(false, 150);
} else if (attachButton.getVisibility() == View.VISIBLE) {
attachButton.setScaleX(0);
attachButton.setScaleY(0);
}
} }
if (botButton != null && botButton.getVisibility() == View.VISIBLE) { if (botButton != null && botButton.getVisibility() == View.VISIBLE) {
@ -6019,7 +6173,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
setSlowModeButtonVisible(false); setSlowModeButtonVisible(false);
cancelBotButton.setVisibility(GONE); cancelBotButton.setVisibility(GONE);
audioVideoButtonContainer.setVisibility(GONE); audioVideoButtonContainer.setVisibility(GONE);
attachLayout.setVisibility(GONE); if (!NekoConfig.useChatAttachMediaMenu) attachLayout.setVisibility(GONE);
sendButtonContainer.setVisibility(GONE); sendButtonContainer.setVisibility(GONE);
if (scheduledButton != null) { if (scheduledButton != null) {
scheduledButton.setVisibility(GONE); scheduledButton.setVisibility(GONE);
@ -6030,6 +6184,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
setTextFieldRunnable = null; setTextFieldRunnable = null;
} }
doneButtonContainer.setVisibility(View.GONE); doneButtonContainer.setVisibility(View.GONE);
doneButtonContainer.setVisibility(View.GONE);
messageEditText.setFilters(new InputFilter[0]); messageEditText.setFilters(new InputFilter[0]);
delegate.onMessageEditEnd(false); delegate.onMessageEditEnd(false);
sendButtonContainer.setVisibility(VISIBLE); sendButtonContainer.setVisibility(VISIBLE);
@ -6059,7 +6214,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
} }
attachLayout.setScaleX(0.01f); attachLayout.setScaleX(0.01f);
attachLayout.setAlpha(0.0f); attachLayout.setAlpha(0.0f);
attachLayout.setVisibility(GONE); if (!NekoConfig.useChatAttachMediaMenu) attachLayout.setVisibility(GONE);
audioVideoButtonContainer.setScaleX(0.1f); audioVideoButtonContainer.setScaleX(0.1f);
audioVideoButtonContainer.setScaleY(0.1f); audioVideoButtonContainer.setScaleY(0.1f);
audioVideoButtonContainer.setAlpha(0.0f); audioVideoButtonContainer.setAlpha(0.0f);
@ -6091,6 +6246,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
if (getVisibility() == VISIBLE) { if (getVisibility() == VISIBLE) {
delegate.onAttachButtonShow(); delegate.onAttachButtonShow();
} }
checkAttachButton(false, 150);
updateFieldRight(1); updateFieldRight(1);
} }
updateFieldHint(); updateFieldHint();

View File

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
V2RAY_CORE_VERSION="4.32.0" V2RAY_CORE_VERSION="4.32.1"
if [ ! -x "$(command -v go)" ]; then if [ ! -x "$(command -v go)" ]; then
@ -12,8 +12,8 @@ if [ ! -x "$(command -v go)" ]; then
# #
# fi # fi
# #
# gvm install go1.15 -B # gvm install go1.15.4 -B
# gvm use go1.15 --default # gvm use go1.15.4 --default
echo "install golang please!" echo "install golang please!"