mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-05-05 23:51:00 +00:00
Update to 7.9.1 (2387)
This commit is contained in:
parent
3e5d2ba92b
commit
24c6968b8a
23 changed files with 266 additions and 138 deletions
|
|
@ -1458,7 +1458,7 @@ public class ActionBar extends FrameLayout {
|
|||
|
||||
@Override
|
||||
public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) {
|
||||
if (startValues.view instanceof SimpleTextView) {
|
||||
if (startValues != null && startValues.view instanceof SimpleTextView) {
|
||||
AnimatorSet animatorSet = new AnimatorSet();
|
||||
Animator animator = super.createAnimator(sceneRoot, startValues, endValues);
|
||||
float s = (float) startValues.values.get("text_size") / (float) endValues.values.get("text_size");
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ public class ActionBarMenuItem extends FrameLayout {
|
|||
toggleSubMenu();
|
||||
return true;
|
||||
}
|
||||
} else if (popupWindow != null && popupWindow.isShowing()) {
|
||||
} else if (showSubmenuByMove && popupWindow != null && popupWindow.isShowing()) {
|
||||
getLocationOnScreen(location);
|
||||
float x = event.getX() + location[0];
|
||||
float y = event.getY() + location[1];
|
||||
|
|
@ -245,14 +245,14 @@ public class ActionBarMenuItem extends FrameLayout {
|
|||
if (!rect.contains((int) x, (int) y)) {
|
||||
child.setPressed(false);
|
||||
child.setSelected(false);
|
||||
if (Build.VERSION.SDK_INT == 21) {
|
||||
if (Build.VERSION.SDK_INT == 21 && child.getBackground() != null) {
|
||||
child.getBackground().setVisible(false, false);
|
||||
}
|
||||
} else {
|
||||
child.setPressed(true);
|
||||
child.setSelected(true);
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
if (Build.VERSION.SDK_INT == 21) {
|
||||
if (Build.VERSION.SDK_INT == 21 && child.getBackground() != null) {
|
||||
child.getBackground().setVisible(true, false);
|
||||
}
|
||||
child.drawableHotspotChanged(x, y - child.getTop());
|
||||
|
|
|
|||
|
|
@ -7460,10 +7460,6 @@ public class Theme {
|
|||
chat_statusRecordPaint.setStrokeCap(Paint.Cap.ROUND);
|
||||
chat_actionTextPaint = new TextPaint(Paint.ANTI_ALIAS_FLAG);
|
||||
chat_actionTextPaint.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
|
||||
chat_actionBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
chat_actionBackgroundSelectedPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
chat_actionBackgroundPaint2 = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
chat_actionBackgroundSelectedPaint2 = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
chat_actionBackgroundGradientDarkenPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
chat_actionBackgroundGradientDarkenPaint.setColor(0x2a000000);
|
||||
chat_timeBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
|
|
@ -7474,6 +7470,18 @@ public class Theme {
|
|||
chat_radialProgressPausedPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
chat_radialProgressPausedSeekbarPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
}
|
||||
if (chat_actionBackgroundPaint == null) {
|
||||
chat_actionBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
}
|
||||
if (chat_actionBackgroundSelectedPaint == null) {
|
||||
chat_actionBackgroundSelectedPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
}
|
||||
if (chat_actionBackgroundPaint2 == null) {
|
||||
chat_actionBackgroundPaint2 = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
}
|
||||
if (chat_actionBackgroundSelectedPaint2 == null) {
|
||||
chat_actionBackgroundSelectedPaint2 = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
}
|
||||
}
|
||||
|
||||
public static void createChatResources(Context context, boolean fontsOnly) {
|
||||
|
|
@ -8046,6 +8054,8 @@ public class Theme {
|
|||
}
|
||||
if (servicePressedColor == null) {
|
||||
servicePressedColor = serviceSelectedMessageColor;
|
||||
}
|
||||
if (servicePressedColor2 == null) {
|
||||
servicePressedColor2 = serviceSelectedMessage2Color;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -29,16 +29,13 @@ import android.graphics.Path;
|
|||
import android.graphics.PixelFormat;
|
||||
import android.graphics.PorterDuff;
|
||||
import android.graphics.PorterDuffColorFilter;
|
||||
import android.graphics.RadialGradient;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.RectF;
|
||||
import android.graphics.Shader;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.drawable.BitmapDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.GradientDrawable;
|
||||
import android.graphics.drawable.RippleDrawable;
|
||||
import android.media.MediaPlayer;
|
||||
import android.net.Uri;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
|
|
@ -71,8 +68,6 @@ import android.widget.Toast;
|
|||
|
||||
import androidx.core.graphics.ColorUtils;
|
||||
|
||||
import com.google.android.exoplayer2.util.Log;
|
||||
|
||||
import org.telegram.PhoneFormat.PhoneFormat;
|
||||
import org.telegram.messenger.AndroidUtilities;
|
||||
import org.telegram.messenger.ChatObject;
|
||||
|
|
@ -119,7 +114,6 @@ import org.telegram.ui.Components.LinkPath;
|
|||
import org.telegram.ui.Components.MediaActionDrawable;
|
||||
import org.telegram.ui.Components.MessageBackgroundDrawable;
|
||||
import org.telegram.ui.Components.MotionBackgroundDrawable;
|
||||
import org.telegram.ui.Components.PlayPauseDrawable;
|
||||
import org.telegram.ui.Components.Point;
|
||||
import org.telegram.ui.Components.RLottieDrawable;
|
||||
import org.telegram.ui.Components.RadialProgress2;
|
||||
|
|
@ -139,7 +133,6 @@ import org.telegram.ui.Components.URLSpanNoUnderline;
|
|||
import org.telegram.ui.Components.VideoForwardDrawable;
|
||||
import org.telegram.ui.PhotoViewer;
|
||||
import org.telegram.ui.PinchToZoomHelper;
|
||||
import org.telegram.ui.RoundVideoProgressShadow;
|
||||
import org.telegram.ui.SecretMediaViewer;
|
||||
|
||||
import java.io.File;
|
||||
|
|
@ -8483,6 +8476,10 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
maxWidth = Math.min(AndroidUtilities.displaySize.x, AndroidUtilities.displaySize.y);
|
||||
}
|
||||
}
|
||||
if (isPlayingRound) {
|
||||
int backgroundWidthLocal = backgroundWidth - (AndroidUtilities.roundPlayingMessageSize - AndroidUtilities.roundMessageSize);
|
||||
return maxWidth - backgroundWidthLocal - AndroidUtilities.dp(57);
|
||||
}
|
||||
return maxWidth - backgroundWidth - AndroidUtilities.dp(57);
|
||||
}
|
||||
if (currentMessagesGroup != null && !currentMessagesGroup.isDocuments) {
|
||||
|
|
@ -10593,6 +10590,9 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
if (currentMessageObject.shouldDrawWithoutBackground()) {
|
||||
if (currentMessageObject.isOutOwner()) {
|
||||
replyStartX = AndroidUtilities.dp(23);
|
||||
if (isPlayingRound) {
|
||||
replyStartX -= (AndroidUtilities.roundPlayingMessageSize - AndroidUtilities.roundMessageSize);
|
||||
}
|
||||
} else if (currentMessageObject.type == MessageObject.TYPE_ROUND_VIDEO) {
|
||||
replyStartX = backgroundDrawableLeft + backgroundDrawableRight + AndroidUtilities.dp(4);
|
||||
} else {
|
||||
|
|
@ -11076,7 +11076,11 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
replyStartX += currentMessagesGroup.transitionParams.offsetLeft;
|
||||
}
|
||||
if (transitionParams.animateBackgroundBoundsInner) {
|
||||
replyStartX += transitionParams.deltaLeft;
|
||||
if (isRoundVideo) {
|
||||
replyStartX += transitionParams.deltaLeft + transitionParams.deltaRight;
|
||||
} else {
|
||||
replyStartX += transitionParams.deltaLeft;
|
||||
}
|
||||
}
|
||||
if (currentMessageObject.shouldDrawWithoutBackground()) {
|
||||
Theme.chat_replyLinePaint.setColor(Theme.getColor(Theme.key_chat_stickerReplyLine));
|
||||
|
|
@ -13222,12 +13226,14 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
y1 = layoutHeight - AndroidUtilities.dp(6.3f - (drawPinnedBottom ? 2 : 0)) - timeLayout.getHeight();
|
||||
}
|
||||
|
||||
Theme.chat_timePaint.setAlpha((int) (255 * timeAlpha));
|
||||
canvas.save();
|
||||
canvas.translate(x1, y1);
|
||||
durationLayout.draw(canvas);
|
||||
canvas.restore();
|
||||
Theme.chat_timePaint.setAlpha(255);
|
||||
if (durationLayout != null) {
|
||||
Theme.chat_timePaint.setAlpha((int) (255 * timeAlpha));
|
||||
canvas.save();
|
||||
canvas.translate(x1, y1);
|
||||
durationLayout.draw(canvas);
|
||||
canvas.restore();
|
||||
Theme.chat_timePaint.setAlpha(255);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -13570,6 +13576,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
private class MessageAccessibilityNodeProvider extends AccessibilityNodeProvider {
|
||||
|
||||
private final int LINK_IDS_START = 2000;
|
||||
private final int LINK_CAPTION_IDS_START = 3000;
|
||||
private final int BOT_BUTTONS_START = 1000;
|
||||
private final int POLL_BUTTONS_START = 500;
|
||||
private final int INSTANT_VIEW = 499;
|
||||
|
|
@ -13583,17 +13590,24 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
|
||||
@Override
|
||||
public AccessibilityNodeInfo createAccessibilityNodeInfo(int virtualViewId) {
|
||||
//FileLog.e("create node info "+virtualViewId);
|
||||
int[] pos = {0, 0};
|
||||
getLocationOnScreen(pos);
|
||||
if (virtualViewId == HOST_VIEW_ID) {
|
||||
AccessibilityNodeInfo info = AccessibilityNodeInfo.obtain(ChatMessageCell.this);
|
||||
onInitializeAccessibilityNodeInfo(info);
|
||||
StringBuilder sb = new StringBuilder();
|
||||
if (isChat && currentUser!=null && !currentMessageObject.isOut()) {
|
||||
if (isChat && currentUser != null && !currentMessageObject.isOut()) {
|
||||
sb.append(UserObject.getUserName(currentUser));
|
||||
sb.append('\n');
|
||||
}
|
||||
if (drawForwardedName) {
|
||||
for (int a = 0; a < 2; a++) {
|
||||
if (forwardedNameLayout[a] != null) {
|
||||
sb.append(forwardedNameLayout[a].getText());
|
||||
sb.append(a == 0 ? " " : "\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!TextUtils.isEmpty(currentMessageObject.messageText)) {
|
||||
sb.append(currentMessageObject.messageText);
|
||||
}
|
||||
|
|
@ -13608,11 +13622,17 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
sb.append(", ");
|
||||
sb.append(AndroidUtilities.formatFileSize(documentAttach.size));
|
||||
}
|
||||
if (documentAttachType == DOCUMENT_ATTACH_TYPE_VIDEO) {
|
||||
sb.append(", ");
|
||||
sb.append(LocaleController.formatDuration(currentMessageObject.getDuration()));
|
||||
}
|
||||
}
|
||||
if (currentMessageObject.isMusic()) {
|
||||
sb.append("\n");
|
||||
sb.append(LocaleController.formatString("AccDescrMusicInfo", R.string.AccDescrMusicInfo, currentMessageObject.getMusicAuthor(), currentMessageObject.getMusicTitle()));
|
||||
} else if (currentMessageObject.isVoice() || isRoundVideo){
|
||||
sb.append(", ");
|
||||
sb.append(LocaleController.formatDuration(currentMessageObject.getDuration()));
|
||||
} else if (currentMessageObject.isVoice() || isRoundVideo) {
|
||||
sb.append(", ");
|
||||
sb.append(LocaleController.formatDuration(currentMessageObject.getDuration()));
|
||||
if (currentMessageObject.isContentUnread()) {
|
||||
|
|
@ -13720,7 +13740,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
info.addAction(AccessibilityNodeInfo.ACTION_LONG_CLICK);
|
||||
}
|
||||
|
||||
if (currentMessageObject.isVoice() || currentMessageObject.isMusic() && MediaController.getInstance().isPlayingMessage(currentMessageObject)) {
|
||||
if ((currentMessageObject.isVoice() || currentMessageObject.isMusic()) && MediaController.getInstance().isPlayingMessage(currentMessageObject)) {
|
||||
seekBarAccessibilityDelegate.onInitializeAccessibilityNodeInfoInternal(info);
|
||||
}
|
||||
|
||||
|
|
@ -13734,6 +13754,15 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
i++;
|
||||
}
|
||||
}
|
||||
if (currentMessageObject.caption instanceof Spannable) {
|
||||
Spannable buffer = (Spannable) currentMessageObject.caption;
|
||||
CharacterStyle[] links = buffer.getSpans(0, buffer.length(), ClickableSpan.class);
|
||||
i = 0;
|
||||
for (CharacterStyle link : links) {
|
||||
info.addChild(ChatMessageCell.this, LINK_CAPTION_IDS_START + i);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
i = 0;
|
||||
for (BotButton button : botButtons) {
|
||||
info.addChild(ChatMessageCell.this, BOT_BUTTONS_START + i);
|
||||
|
|
@ -13768,12 +13797,43 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
info.setSource(ChatMessageCell.this, virtualViewId);
|
||||
info.setParent(ChatMessageCell.this);
|
||||
info.setPackageName(getContext().getPackageName());
|
||||
if (virtualViewId >= LINK_IDS_START) {
|
||||
if (virtualViewId >= LINK_CAPTION_IDS_START) {
|
||||
if (!(currentMessageObject.caption instanceof Spannable) || captionLayout == null) {
|
||||
return null;
|
||||
}
|
||||
Spannable buffer = (Spannable) currentMessageObject.caption;
|
||||
ClickableSpan link = getLinkById(virtualViewId, true);
|
||||
if (link == null) {
|
||||
return null;
|
||||
}
|
||||
int[] linkPos = getRealSpanStartAndEnd(buffer, link);
|
||||
String content = buffer.subSequence(linkPos[0], linkPos[1]).toString();
|
||||
info.setText(content);
|
||||
int length = captionLayout.getText().length();
|
||||
|
||||
captionLayout.getSelectionPath(linkPos[0], linkPos[1], linkPath);
|
||||
linkPath.computeBounds(rectF, true);
|
||||
rect.set((int) rectF.left, (int) rectF.top, (int) rectF.right, (int) rectF.bottom);
|
||||
rect.offset((int) captionX, (int) captionY);
|
||||
info.setBoundsInParent(rect);
|
||||
if (accessibilityVirtualViewBounds.get(virtualViewId) == null) {
|
||||
accessibilityVirtualViewBounds.put(virtualViewId, new Rect(rect));
|
||||
}
|
||||
rect.offset(pos[0], pos[1]);
|
||||
info.setBoundsInScreen(rect);
|
||||
|
||||
info.setClassName("android.widget.TextView");
|
||||
info.setEnabled(true);
|
||||
info.setClickable(true);
|
||||
info.setLongClickable(true);
|
||||
info.addAction(AccessibilityNodeInfo.ACTION_CLICK);
|
||||
info.addAction(AccessibilityNodeInfo.ACTION_LONG_CLICK);
|
||||
} else if (virtualViewId >= LINK_IDS_START) {
|
||||
if (!(currentMessageObject.messageText instanceof Spannable)) {
|
||||
return null;
|
||||
}
|
||||
Spannable buffer = (Spannable) currentMessageObject.messageText;
|
||||
ClickableSpan link = getLinkById(virtualViewId);
|
||||
ClickableSpan link = getLinkById(virtualViewId, false);
|
||||
if (link == null) {
|
||||
return null;
|
||||
}
|
||||
|
|
@ -13898,7 +13958,6 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
info.setContentDescription(LocaleController.getString("ShareFile", R.string.ShareFile));
|
||||
}
|
||||
info.addAction(AccessibilityNodeInfo.ACTION_CLICK);
|
||||
// } else if (drawShareButton && x >= shareStartX && x <= shareStartX + AndroidUtilities.dp(40) && y >= shareStartY && y <= shareStartY + AndroidUtilities.dp(32)) {
|
||||
rect.set((int) sideStartX, (int) sideStartY, (int) sideStartX + AndroidUtilities.dp(40), (int) sideStartY + AndroidUtilities.dp(32));
|
||||
info.setBoundsInParent(rect);
|
||||
if (accessibilityVirtualViewBounds.get(virtualViewId) == null || !accessibilityVirtualViewBounds.get(virtualViewId).equals(rect)) {
|
||||
|
|
@ -13960,8 +14019,14 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
if (action == AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS) {
|
||||
sendAccessibilityEventForVirtualView(virtualViewId, AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED);
|
||||
} else if (action == AccessibilityNodeInfo.ACTION_CLICK) {
|
||||
if (virtualViewId >= LINK_IDS_START) {
|
||||
ClickableSpan link = getLinkById(virtualViewId);
|
||||
if (virtualViewId >= LINK_CAPTION_IDS_START) {
|
||||
ClickableSpan link = getLinkById(virtualViewId, true);
|
||||
if (link != null) {
|
||||
delegate.didPressUrl(ChatMessageCell.this, link, false);
|
||||
sendAccessibilityEventForVirtualView(virtualViewId, AccessibilityEvent.TYPE_VIEW_CLICKED);
|
||||
}
|
||||
} else if (virtualViewId >= LINK_IDS_START) {
|
||||
ClickableSpan link = getLinkById(virtualViewId, false);
|
||||
if (link != null) {
|
||||
delegate.didPressUrl(ChatMessageCell.this, link, false);
|
||||
sendAccessibilityEventForVirtualView(virtualViewId, AccessibilityEvent.TYPE_VIEW_CLICKED);
|
||||
|
|
@ -14018,7 +14083,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
}
|
||||
}
|
||||
} else if (action == AccessibilityNodeInfo.ACTION_LONG_CLICK) {
|
||||
ClickableSpan link = getLinkById(virtualViewId);
|
||||
ClickableSpan link = getLinkById(virtualViewId, virtualViewId >= LINK_CAPTION_IDS_START);
|
||||
if (link != null) {
|
||||
delegate.didPressUrl(ChatMessageCell.this, link, true);
|
||||
sendAccessibilityEventForVirtualView(virtualViewId, AccessibilityEvent.TYPE_VIEW_LONG_CLICKED);
|
||||
|
|
@ -14028,17 +14093,30 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
|||
return true;
|
||||
}
|
||||
|
||||
private ClickableSpan getLinkById(int id) {
|
||||
id -= LINK_IDS_START;
|
||||
if (!(currentMessageObject.messageText instanceof Spannable)) {
|
||||
return null;
|
||||
private ClickableSpan getLinkById(int id, boolean caption) {
|
||||
if (caption) {
|
||||
id -= LINK_CAPTION_IDS_START;
|
||||
if (!(currentMessageObject.caption instanceof Spannable)) {
|
||||
return null;
|
||||
}
|
||||
Spannable buffer = (Spannable) currentMessageObject.caption;
|
||||
ClickableSpan[] links = buffer.getSpans(0, buffer.length(), ClickableSpan.class);
|
||||
if (links.length <= id) {
|
||||
return null;
|
||||
}
|
||||
return links[id];
|
||||
} else {
|
||||
id -= LINK_IDS_START;
|
||||
if (!(currentMessageObject.messageText instanceof Spannable)) {
|
||||
return null;
|
||||
}
|
||||
Spannable buffer = (Spannable) currentMessageObject.messageText;
|
||||
ClickableSpan[] links = buffer.getSpans(0, buffer.length(), ClickableSpan.class);
|
||||
if (links.length <= id) {
|
||||
return null;
|
||||
}
|
||||
return links[id];
|
||||
}
|
||||
Spannable buffer = (Spannable) currentMessageObject.messageText;
|
||||
ClickableSpan[] links = buffer.getSpans(0, buffer.length(), ClickableSpan.class);
|
||||
if (links.length <= id) {
|
||||
return null;
|
||||
}
|
||||
return links[id];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2793,6 +2793,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
groupedBackgroundWasDraw = true;
|
||||
}
|
||||
|
||||
if (cell != null && cell.getPhotoImage().isAnimationRunning()) {
|
||||
invalidate();
|
||||
}
|
||||
|
||||
float viewClipLeft = Math.max(chatListView.getLeft(), chatListView.getLeft() + child.getX());
|
||||
float viewClipTop = Math.max(listTop, chatListView.getTop() + child.getY());
|
||||
float viewClipRight = Math.min(chatListView.getRight(), chatListView.getLeft() + child.getX() + child.getMeasuredWidth());
|
||||
|
|
|
|||
|
|
@ -1832,9 +1832,12 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
return false;
|
||||
}
|
||||
if (isPopupShowing() && event.getAction() == MotionEvent.ACTION_DOWN) {
|
||||
boolean rez = false;
|
||||
if (searchingType != 0) {
|
||||
searchingType = 0;
|
||||
emojiView.closeSearch(false);
|
||||
requestFocus();
|
||||
rez = true;
|
||||
}
|
||||
showPopup(AndroidUtilities.usingHardwareInput ? 0 : 2, 0);
|
||||
if (stickersExpanded) {
|
||||
|
|
@ -1847,7 +1850,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
} else {
|
||||
openKeyboardInternal();
|
||||
}
|
||||
return false;
|
||||
return rez;
|
||||
}
|
||||
try {
|
||||
return super.onTouchEvent(event);
|
||||
|
|
@ -4092,7 +4095,7 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
if (stickersExpanded) {
|
||||
setStickersExpanded(false, true, false);
|
||||
if (searchingType != 0) {
|
||||
if (searchingType != 0 && emojiView != null) {
|
||||
emojiView.closeSearch(false);
|
||||
emojiView.hideSearchKeyboard();
|
||||
}
|
||||
|
|
@ -4165,6 +4168,20 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe
|
|||
}
|
||||
return;
|
||||
}
|
||||
if (searchingType != 0) {
|
||||
searchingType = 0;
|
||||
emojiView.closeSearch(false);
|
||||
|
||||
if (stickersExpanded) {
|
||||
setStickersExpanded(false, true, false);
|
||||
waitingForKeyboardOpenAfterAnimation = true;
|
||||
AndroidUtilities.runOnUIThread(() -> {
|
||||
waitingForKeyboardOpenAfterAnimation = false;
|
||||
openKeyboardInternal();
|
||||
}, 200);
|
||||
}
|
||||
}
|
||||
|
||||
CharSequence[] message = new CharSequence[]{AndroidUtilities.getTrimmedString(messageEditText.getText())};
|
||||
ArrayList<TLRPC.MessageEntity> entities = MediaDataController.getInstance(currentAccount).getEntities(message, supportsSendingNewEntities());
|
||||
if (!TextUtils.equals(message[0], editingMessageObject.messageText) || entities != null && !entities.isEmpty() || entities == null && !editingMessageObject.messageOwner.entities.isEmpty() || editingMessageObject.messageOwner.media instanceof TLRPC.TL_messageMediaWebPage) {
|
||||
|
|
|
|||
|
|
@ -220,6 +220,7 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
|
|||
private int pointerId1, pointerId2;
|
||||
private int textureViewSize;
|
||||
private boolean isMessageTransition;
|
||||
private boolean updateTextureViewSize;
|
||||
|
||||
@SuppressLint("ClickableViewAccessibility")
|
||||
public InstantCameraView(Context context, ChatActivity parentFragment) {
|
||||
|
|
@ -358,21 +359,24 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
|
|||
|
||||
@Override
|
||||
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
|
||||
int newSize;
|
||||
if (MeasureSpec.getSize(heightMeasureSpec) > MeasureSpec.getSize(widthMeasureSpec)) {
|
||||
newSize = AndroidUtilities.roundPlayingMessageSize;
|
||||
} else {
|
||||
newSize = AndroidUtilities.roundMessageSize;
|
||||
}
|
||||
if (newSize != textureViewSize) {
|
||||
textureViewSize = newSize;
|
||||
textureOverlayView.getLayoutParams().width = textureOverlayView.getLayoutParams().height = textureViewSize;
|
||||
cameraContainer.getLayoutParams().width = cameraContainer.getLayoutParams().height = textureViewSize;
|
||||
((LayoutParams) muteImageView.getLayoutParams()).topMargin = textureViewSize / 2 - AndroidUtilities.dp(24);
|
||||
textureOverlayView.setRoundRadius(textureViewSize / 2);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
cameraContainer.invalidateOutline();
|
||||
if (updateTextureViewSize) {
|
||||
int newSize;
|
||||
if (MeasureSpec.getSize(heightMeasureSpec) > MeasureSpec.getSize(widthMeasureSpec) * 1.3f) {
|
||||
newSize = AndroidUtilities.roundPlayingMessageSize;
|
||||
} else {
|
||||
newSize = AndroidUtilities.roundMessageSize;
|
||||
}
|
||||
if (newSize != textureViewSize) {
|
||||
textureViewSize = newSize;
|
||||
textureOverlayView.getLayoutParams().width = textureOverlayView.getLayoutParams().height = textureViewSize;
|
||||
cameraContainer.getLayoutParams().width = cameraContainer.getLayoutParams().height = textureViewSize;
|
||||
((LayoutParams) muteImageView.getLayoutParams()).topMargin = textureViewSize / 2 - AndroidUtilities.dp(24);
|
||||
textureOverlayView.setRoundRadius(textureViewSize / 2);
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
||||
cameraContainer.invalidateOutline();
|
||||
}
|
||||
}
|
||||
updateTextureViewSize = false;
|
||||
}
|
||||
|
||||
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
|
||||
|
|
@ -597,6 +601,7 @@ public class InstantCameraView extends FrameLayout implements NotificationCenter
|
|||
});
|
||||
cameraContainer.addView(textureView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
|
||||
|
||||
updateTextureViewSize = true;
|
||||
setVisibility(VISIBLE);
|
||||
|
||||
startAnimation(true);
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@ public class RecyclerAnimationScrollHelper {
|
|||
}
|
||||
}
|
||||
|
||||
recyclerView.setScrollEnabled(true);
|
||||
recyclerView.setVerticalScrollBarEnabled(true);
|
||||
|
||||
if (BuildVars.DEBUG_VERSION) {
|
||||
|
|
|
|||
|
|
@ -4138,7 +4138,9 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
if (searchIsShowed) {
|
||||
AndroidUtilities.requestAdjustResize(getParentActivity(), classGuid);
|
||||
}
|
||||
viewPages[0].dialogsAdapter.notifyDataSetChanged();
|
||||
if (viewPages != null) {
|
||||
viewPages[0].dialogsAdapter.notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -1629,7 +1629,7 @@ public class LoginActivity extends BaseFragment {
|
|||
return;
|
||||
}
|
||||
String phone = PhoneFormat.stripExceptNumbers("" + codeField.getText() + phoneField.getText());
|
||||
boolean isTestBakcend = getConnectionsManager().isTestBackend();
|
||||
boolean isTestBakcend = BuildVars.DEBUG_PRIVATE_VERSION && getConnectionsManager().isTestBackend();
|
||||
if (isTestBakcend != testBackend) {
|
||||
getConnectionsManager().switchBackend(false);
|
||||
isTestBakcend = testBackend;
|
||||
|
|
|
|||
|
|
@ -4763,7 +4763,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
public void setVisibility(int visibility) {
|
||||
super.setVisibility(visibility);
|
||||
if (videoTimelineView != null && videoTimelineView.getVisibility() != GONE) {
|
||||
showVideoTimeline(visibility == View.VISIBLE, false);
|
||||
videoTimelineView.setVisibility(visibility == VISIBLE ? VISIBLE : INVISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4801,8 +4801,10 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
videoTimelineView = new VideoTimelinePlayView(parentActivity) {
|
||||
@Override
|
||||
public void setTranslationY(float translationY) {
|
||||
super.setTranslationY(translationY);
|
||||
containerView.invalidate();
|
||||
if (getTranslationY() != translationY) {
|
||||
super.setTranslationY(translationY);
|
||||
containerView.invalidate();
|
||||
}
|
||||
}
|
||||
};
|
||||
videoTimelineView.setDelegate(new VideoTimelinePlayView.VideoTimelineViewDelegate() {
|
||||
|
|
@ -10485,6 +10487,8 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
|||
if (!animated) {
|
||||
videoTimelineView.animate().setListener(null).cancel();
|
||||
videoTimelineView.setVisibility(show ? View.VISIBLE : View.GONE);
|
||||
videoTimelineView.setTranslationY(0);
|
||||
videoTimelineView.setAlpha(pickerView.getAlpha());
|
||||
} else {
|
||||
if (show && videoTimelineView.getTag() == null) {
|
||||
if (videoTimelineView.getVisibility() != View.VISIBLE) {
|
||||
|
|
|
|||
|
|
@ -2676,7 +2676,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
LocaleController.getString("DebugMenuClearMediaCache", R.string.DebugMenuClearMediaCache),
|
||||
LocaleController.getString("DebugMenuCallSettings", R.string.DebugMenuCallSettings),
|
||||
null,
|
||||
BuildVars.DEBUG_PRIVATE_VERSION || AndroidUtilities.isStandaloneApp() ? LocaleController.getString("DebugMenuCheckAppUpdate", R.string.DebugMenuCheckAppUpdate) : null,
|
||||
BuildVars.DEBUG_PRIVATE_VERSION || BuildVars.isStandaloneApp() ? LocaleController.getString("DebugMenuCheckAppUpdate", R.string.DebugMenuCheckAppUpdate) : null,
|
||||
LocaleController.getString("DebugMenuReadAllDialogs", R.string.DebugMenuReadAllDialogs),
|
||||
SharedConfig.pauseMusicOnRecord ? LocaleController.getString("DebugMenuDisablePauseMusic", R.string.DebugMenuDisablePauseMusic) : LocaleController.getString("DebugMenuEnablePauseMusic", R.string.DebugMenuEnablePauseMusic),
|
||||
BuildVars.DEBUG_VERSION && !AndroidUtilities.isTablet() && Build.VERSION.SDK_INT >= 23 ? (SharedConfig.smoothKeyboard ? LocaleController.getString("DebugMenuDisableSmoothKeyboard", R.string.DebugMenuDisableSmoothKeyboard) : LocaleController.getString("DebugMenuEnableSmoothKeyboard", R.string.DebugMenuEnableSmoothKeyboard)) : null,
|
||||
|
|
@ -3012,6 +3012,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
timeItem = new ImageView(context);
|
||||
timeItem.setPadding(AndroidUtilities.dp(10), AndroidUtilities.dp(10), AndroidUtilities.dp(5), AndroidUtilities.dp(5));
|
||||
timeItem.setScaleType(ImageView.ScaleType.CENTER);
|
||||
timeItem.setAlpha(0.0f);
|
||||
timeItem.setImageDrawable(timerDrawable = new TimerDrawable(context));
|
||||
frameLayout.addView(timeItem, LayoutHelper.createFrame(34, 34, Gravity.TOP | Gravity.LEFT));
|
||||
updateTimeItem();
|
||||
|
|
@ -5005,6 +5006,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
@Override
|
||||
protected AnimatorSet onCustomTransitionAnimation(final boolean isOpen, final Runnable callback) {
|
||||
if (playProfileAnimation != 0 && allowProfileAnimation && !isPulledDown) {
|
||||
if (timeItem != null) {
|
||||
timeItem.setAlpha(1.0f);
|
||||
}
|
||||
final AnimatorSet animatorSet = new AnimatorSet();
|
||||
animatorSet.setDuration(playProfileAnimation == 2 ? 250 : 180);
|
||||
listView.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
|
|
@ -5060,9 +5064,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
animators.add(ObjectAnimator.ofFloat(nameTextView[a], View.ALPHA, a == 0 ? 0.0f : 1.0f));
|
||||
}
|
||||
if (timeItem.getTag() != null) {
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.ALPHA, 0.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.SCALE_X, 0.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.SCALE_Y, 0.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.ALPHA, 1.0f, 0.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.SCALE_X, 1.0f, 0.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.SCALE_Y, 1.0f, 0.0f));
|
||||
}
|
||||
if (animatingItem != null) {
|
||||
animatingItem.setAlpha(1.0f);
|
||||
|
|
@ -5114,9 +5118,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
animators.add(ObjectAnimator.ofFloat(nameTextView[a], View.ALPHA, a == 0 ? 1.0f : 0.0f));
|
||||
}
|
||||
if (timeItem.getTag() != null) {
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.ALPHA, 1.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.SCALE_X, 1.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.SCALE_Y, 1.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.ALPHA, 0.0f, 1.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.SCALE_X, 0.0f, 1.0f));
|
||||
animators.add(ObjectAnimator.ofFloat(timeItem, View.SCALE_Y, 0.0f, 1.0f));
|
||||
}
|
||||
if (animatingItem != null) {
|
||||
animatingItem.setAlpha(0.0f);
|
||||
|
|
@ -6783,7 +6787,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
|||
break;
|
||||
case 0:
|
||||
case 9:
|
||||
if (AndroidUtilities.isStandaloneApp()) {
|
||||
if (BuildVars.isStandaloneApp()) {
|
||||
abi = "direct " + Build.CPU_ABI + " " + Build.CPU_ABI2;
|
||||
} else {
|
||||
abi = "universal " + Build.CPU_ABI + " " + Build.CPU_ABI2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue