mirror of https://github.com/NekoX-Dev/NekoX.git
Refind input menu ( #236 )
This commit is contained in:
parent
0c0bfc4523
commit
7d6ad8ab62
|
@ -2,8 +2,8 @@ apply plugin: 'com.android.application'
|
|||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
def verName = "7.2.1-rc04"
|
||||
def verCode = 110
|
||||
def verName = "7.2.1-rc05"
|
||||
def verCode = 112
|
||||
|
||||
def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json")
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ import android.graphics.PorterDuffColorFilter;
|
|||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.TransitionDrawable;
|
||||
import android.media.AudioManager;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
@ -327,8 +328,6 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
private Drawable sendButtonDrawable;
|
||||
private Drawable inactinveSendButtonDrawable;
|
||||
private Drawable sendButtonInverseDrawable;
|
||||
private ActionBarPopupWindow sendPopupWindow;
|
||||
private ActionBarPopupWindow.ActionBarPopupWindowLayout sendPopupLayout;
|
||||
private ImageView cancelBotButton;
|
||||
private ImageView[] emojiButton = new ImageView[2];
|
||||
@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.setPadding(0, 0, AndroidUtilities.dp(4), 0);
|
||||
audioSendButton.setContentDescription(!NekoConfig.useChatAttachMediaMenu ?
|
||||
LocaleController.getString("AccDescrVoiceMessage", R.string.AccDescrVoiceMessage)
|
||||
:
|
||||
LocaleController.getString("AccDescrVoiceMessage", R.string.AccDescrVoiceMessage) :
|
||||
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.setAccessibilityDelegate(mediaMessageButtonsDelegate);
|
||||
audioVideoButtonContainer.addView(audioSendButton, LayoutHelper.createFrame(48, 48));
|
||||
|
@ -3092,16 +3094,34 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
return false;
|
||||
}
|
||||
|
||||
private ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayout;
|
||||
private ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayoutDefault;
|
||||
private ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayoutInput;
|
||||
private ActionBarPopupWindow menuPopupWindowDefault;
|
||||
private ActionBarPopupWindow menuPopupWindowInput;
|
||||
private ActionBarPopupWindow menuPopupWindow;
|
||||
private boolean isInInput;
|
||||
|
||||
private void onMenuClick(View view) {
|
||||
if (parentFragment == null) {
|
||||
return;
|
||||
}
|
||||
ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayout;
|
||||
|
||||
if (isInInput) {
|
||||
menuPopupLayout = menuPopupLayoutInput;
|
||||
menuPopupWindow = menuPopupWindowInput;
|
||||
} else {
|
||||
menuPopupLayout = menuPopupLayoutDefault;
|
||||
menuPopupWindow = menuPopupWindowDefault;
|
||||
}
|
||||
|
||||
if (menuPopupLayout == null) {
|
||||
menuPopupLayout = new ActionBarPopupWindow.ActionBarPopupWindowLayout(parentActivity);
|
||||
if (isInInput) {
|
||||
menuPopupLayoutInput = menuPopupLayout;
|
||||
} else {
|
||||
menuPopupLayoutDefault = menuPopupLayout;
|
||||
}
|
||||
menuPopupLayout.setAnimationEnabled(false);
|
||||
menuPopupLayout.setOnTouchListener(new OnTouchListener() {
|
||||
|
||||
|
@ -3125,6 +3145,8 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
|
||||
ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getContext());
|
||||
|
||||
if (!isInInput) {
|
||||
|
||||
cell.setTextAndIcon(LocaleController.getString("ChatAttachEnterMenuRecordAudio", R.string.ChatAttachEnterMenuRecordAudio), R.drawable.input_mic);
|
||||
cell.setOnClickListener(v -> {
|
||||
if (menuPopupWindow != null && menuPopupWindow.isShowing()) {
|
||||
|
@ -3175,6 +3197,68 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
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());
|
||||
|
||||
}
|
||||
|
||||
TLRPC.Chat chat = parentFragment.getCurrentChat();
|
||||
TLRPC.User user = parentFragment.getCurrentUser();
|
||||
|
||||
int chatId;
|
||||
if (chat != null) {
|
||||
chatId = chat.id;
|
||||
} else if (user != null) {
|
||||
chatId = user.id;
|
||||
} else {
|
||||
chatId = -1;
|
||||
}
|
||||
|
||||
cell.setTextAndIcon(LocaleController.getString("Translate", R.string.Translate), R.drawable.ic_translate);
|
||||
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();
|
||||
if (dlps > 0) {
|
||||
cell = new ActionBarMenuSubItem(getContext());
|
||||
|
@ -3213,6 +3297,12 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
menuPopupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED);
|
||||
menuPopupWindow.getContentView().setFocusableInTouchMode(true);
|
||||
|
||||
if (isInInput) {
|
||||
menuPopupWindowInput = menuPopupWindow;
|
||||
} else {
|
||||
menuPopupWindowDefault = menuPopupWindow;
|
||||
}
|
||||
|
||||
if (delegate != null) {
|
||||
delegate.onSendLongClick();
|
||||
}
|
||||
|
@ -3229,11 +3319,18 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
y = location[1] - menuPopupLayout.getMeasuredHeight() - AndroidUtilities.dp(2);
|
||||
}
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
private ActionBarPopupWindow sendPopupWindow;
|
||||
private ActionBarPopupWindow.ActionBarPopupWindowLayout sendPopupLayout;
|
||||
|
||||
private boolean onSendLongClick(View view) {
|
||||
if (parentFragment == null || isInScheduleMode()) {
|
||||
return false;
|
||||
|
@ -3281,53 +3378,6 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
|
||||
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()) {
|
||||
cell = new ActionBarMenuSubItem(getContext());
|
||||
if (UserObject.isUserSelf(user)) {
|
||||
|
@ -3533,14 +3583,15 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
if (videoSendButton == null) {
|
||||
return;
|
||||
}
|
||||
if (NekoConfig.useChatAttachMediaMenu) visible = animated = false;
|
||||
|
||||
videoSendButton.setTag(visible ? 1 : null);
|
||||
|
||||
if (audioVideoButtonAnimation != null) {
|
||||
audioVideoButtonAnimation.cancel();
|
||||
audioVideoButtonAnimation = null;
|
||||
}
|
||||
|
||||
if (NekoConfig.useChatAttachMediaMenu) visible = animated = false;
|
||||
|
||||
if (animated) {
|
||||
SharedPreferences preferences = MessagesController.getGlobalMainSettings();
|
||||
boolean isChannel = false;
|
||||
|
@ -4236,6 +4287,59 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
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) {
|
||||
if (recordPannelAnimation != null && recordPannelAnimation.isRunning()) {
|
||||
return;
|
||||
|
@ -4321,8 +4425,10 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
exitAnimation.setDuration(200);
|
||||
|
||||
AnimatorSet attachIconAnimator;
|
||||
AnimatorSet attachIconAnimator = null;
|
||||
if (attachButton != null) {
|
||||
checkAttachButton(false, 150);
|
||||
if (!attachButton.isShown()) {
|
||||
attachButton.setAlpha(0f);
|
||||
attachButton.setScaleX(0);
|
||||
attachButton.setScaleY(0);
|
||||
|
@ -4334,8 +4440,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
ObjectAnimator.ofFloat(attachButton, View.SCALE_Y, 1.0f)
|
||||
);
|
||||
attachIconAnimator.setDuration(150);
|
||||
} else {
|
||||
attachIconAnimator = null;
|
||||
}
|
||||
}
|
||||
|
||||
emojiButton[0].setAlpha(0f);
|
||||
|
@ -4538,6 +4643,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
|
||||
if (attachLayout != null) {
|
||||
if (!NekoConfig.useChatAttachMediaMenu) {
|
||||
runningAnimation2 = new AnimatorSet();
|
||||
ArrayList<Animator> animators = new ArrayList<>();
|
||||
animators.add(ObjectAnimator.ofFloat(attachLayout, View.ALPHA, 0.0f));
|
||||
|
@ -4577,18 +4683,26 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
}
|
||||
});
|
||||
|
||||
runningAnimation2.start();
|
||||
updateFieldRight(0);
|
||||
if (delegate != null && getVisibility() == VISIBLE) {
|
||||
delegate.onAttachButtonHidden();
|
||||
}
|
||||
} else {
|
||||
checkAttachButton(true, 150);
|
||||
updateFieldRight(1);
|
||||
}
|
||||
|
||||
runningAnimationType = 5;
|
||||
runningAnimation = new AnimatorSet();
|
||||
|
||||
ArrayList<Animator> animators = new ArrayList<>();
|
||||
if (audioVideoButtonContainer.getVisibility() == VISIBLE) {
|
||||
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));
|
||||
|
@ -4663,11 +4777,16 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
expandStickersButton.setVisibility(GONE);
|
||||
}
|
||||
if (attachLayout != null) {
|
||||
if (!NekoConfig.useChatAttachMediaMenu) {
|
||||
attachLayout.setVisibility(GONE);
|
||||
if (delegate != null && getVisibility() == VISIBLE) {
|
||||
delegate.onAttachButtonHidden();
|
||||
}
|
||||
updateFieldRight(0);
|
||||
} else {
|
||||
checkAttachButton(true, 0);
|
||||
updateFieldRight(1);
|
||||
}
|
||||
}
|
||||
scheduleButtonHidden = false;
|
||||
if (scheduledButton != null) {
|
||||
|
@ -4682,6 +4801,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (message.length() > 0 || forceShowSendButton || audioToSend != null || videoToSendMessageObject != null || slowModeTimer == Integer.MAX_VALUE && !isInScheduleMode()) {
|
||||
final String caption = messageEditText.getCaption();
|
||||
boolean showBotButton = caption != null && (sendButton.getVisibility() == VISIBLE || expandStickersButton.getVisibility() == VISIBLE);
|
||||
|
@ -4708,6 +4828,8 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
|
||||
if (attachLayout != null) {
|
||||
|
||||
if (!NekoConfig.useChatAttachMediaMenu) {
|
||||
runningAnimation2 = new AnimatorSet();
|
||||
ArrayList<Animator> animators = new ArrayList<>();
|
||||
animators.add(ObjectAnimator.ofFloat(attachLayout, View.ALPHA, 0.0f));
|
||||
|
@ -4753,11 +4875,20 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
if (delegate != null && getVisibility() == VISIBLE) {
|
||||
delegate.onAttachButtonHidden();
|
||||
}
|
||||
} else {
|
||||
checkAttachButton(true, 150);
|
||||
updateFieldRight(1);
|
||||
}
|
||||
}
|
||||
|
||||
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));
|
||||
}
|
||||
if (audioVideoButtonContainer.getVisibility() == VISIBLE) {
|
||||
animators.add(ObjectAnimator.ofFloat(audioVideoButtonContainer, View.SCALE_X, 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);
|
||||
}
|
||||
if (attachLayout != null) {
|
||||
if (!NekoConfig.useChatAttachMediaMenu) {
|
||||
attachLayout.setVisibility(GONE);
|
||||
if (delegate != null && getVisibility() == VISIBLE) {
|
||||
delegate.onAttachButtonHidden();
|
||||
}
|
||||
updateFieldRight(0);
|
||||
} else {
|
||||
checkAttachButton(true, 0);
|
||||
updateFieldRight(1);
|
||||
}
|
||||
}
|
||||
scheduleButtonHidden = true;
|
||||
if (scheduledButton != null) {
|
||||
|
@ -4937,6 +5073,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
});
|
||||
runningAnimation2.start();
|
||||
checkAttachButton(false, 150);
|
||||
updateFieldRight(1);
|
||||
if (getVisibility() == VISIBLE) {
|
||||
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_Y, 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) {
|
||||
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_X, 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();
|
||||
}
|
||||
attachLayout.setVisibility(VISIBLE);
|
||||
checkAttachButton(false, 0);
|
||||
updateFieldRight(1);
|
||||
}
|
||||
scheduleButtonHidden = false;
|
||||
|
@ -5089,6 +5232,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
});
|
||||
runningAnimation2.start();
|
||||
checkAttachButton(false, 150);
|
||||
updateFieldRight(1);
|
||||
if (getVisibility() == VISIBLE) {
|
||||
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_Y, 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) {
|
||||
animators.add(ObjectAnimator.ofFloat(cancelBotButton, View.SCALE_X, 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.setScaleX(1.0f);
|
||||
attachLayout.setVisibility(VISIBLE);
|
||||
checkAttachButton(false, 0);
|
||||
updateFieldRight(1);
|
||||
}
|
||||
scheduleButtonHidden = false;
|
||||
|
@ -5643,10 +5793,14 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
audioVideoButtonContainer.setScaleX(0);
|
||||
audioVideoButtonContainer.setScaleY(0);
|
||||
|
||||
if (attachButton != null && attachButton.getVisibility() == View.VISIBLE) {
|
||||
if (attachButton != null) {
|
||||
if (NekoConfig.useChatAttachMediaMenu) {
|
||||
checkAttachButton(false, 150);
|
||||
} else if (attachButton.getVisibility() == View.VISIBLE) {
|
||||
attachButton.setScaleX(0);
|
||||
attachButton.setScaleY(0);
|
||||
}
|
||||
}
|
||||
|
||||
if (botButton != null && botButton.getVisibility() == View.VISIBLE) {
|
||||
botButton.setScaleX(0);
|
||||
|
@ -6019,7 +6173,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
setSlowModeButtonVisible(false);
|
||||
cancelBotButton.setVisibility(GONE);
|
||||
audioVideoButtonContainer.setVisibility(GONE);
|
||||
attachLayout.setVisibility(GONE);
|
||||
if (!NekoConfig.useChatAttachMediaMenu) attachLayout.setVisibility(GONE);
|
||||
sendButtonContainer.setVisibility(GONE);
|
||||
if (scheduledButton != null) {
|
||||
scheduledButton.setVisibility(GONE);
|
||||
|
@ -6030,6 +6184,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
setTextFieldRunnable = null;
|
||||
}
|
||||
doneButtonContainer.setVisibility(View.GONE);
|
||||
doneButtonContainer.setVisibility(View.GONE);
|
||||
messageEditText.setFilters(new InputFilter[0]);
|
||||
delegate.onMessageEditEnd(false);
|
||||
sendButtonContainer.setVisibility(VISIBLE);
|
||||
|
@ -6059,7 +6214,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
attachLayout.setScaleX(0.01f);
|
||||
attachLayout.setAlpha(0.0f);
|
||||
attachLayout.setVisibility(GONE);
|
||||
if (!NekoConfig.useChatAttachMediaMenu) attachLayout.setVisibility(GONE);
|
||||
audioVideoButtonContainer.setScaleX(0.1f);
|
||||
audioVideoButtonContainer.setScaleY(0.1f);
|
||||
audioVideoButtonContainer.setAlpha(0.0f);
|
||||
|
@ -6091,6 +6246,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
if (getVisibility() == VISIBLE) {
|
||||
delegate.onAttachButtonShow();
|
||||
}
|
||||
checkAttachButton(false, 150);
|
||||
updateFieldRight(1);
|
||||
}
|
||||
updateFieldHint();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
V2RAY_CORE_VERSION="4.32.0"
|
||||
V2RAY_CORE_VERSION="4.32.1"
|
||||
|
||||
if [ ! -x "$(command -v go)" ]; then
|
||||
|
||||
|
@ -12,8 +12,8 @@ if [ ! -x "$(command -v go)" ]; then
|
|||
#
|
||||
# fi
|
||||
#
|
||||
# gvm install go1.15 -B
|
||||
# gvm use go1.15 --default
|
||||
# gvm install go1.15.4 -B
|
||||
# gvm use go1.15.4 --default
|
||||
|
||||
echo "install golang please!"
|
||||
|
||||
|
|
Loading…
Reference in New Issue