Minor fixes
This commit is contained in:
parent
244a082e96
commit
3251959c47
@ -5,8 +5,8 @@ apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply plugin: 'kotlin-android-extensions'
|
||||
|
||||
def verName = "7.0.1.3"
|
||||
def verCode = 70
|
||||
def verName = "7.1.2-rc01"
|
||||
def verCode = 73
|
||||
|
||||
def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json")
|
||||
|
||||
@ -31,9 +31,7 @@ void setupPlay(boolean beta) {
|
||||
play {
|
||||
|
||||
track = beta ? "beta" : "production"
|
||||
|
||||
defaultToAppBundles = true
|
||||
|
||||
userFraction = 1
|
||||
|
||||
}
|
||||
@ -59,7 +57,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'cn.hutool:hutool-all:5.4.0'
|
||||
classpath 'cn.hutool:hutool-all:5.4.3'
|
||||
}
|
||||
|
||||
}
|
||||
@ -86,14 +84,13 @@ dependencies {
|
||||
// TODO: fix problem with android L
|
||||
implementation 'com.google.zxing:core:3.4.1'
|
||||
|
||||
compileOnly 'org.checkerframework:checker-qual:3.6.1'
|
||||
compileOnly 'org.checkerframework:checker-qual:3.7.0'
|
||||
compileOnly 'org.checkerframework:checker-compat-qual:2.5.5'
|
||||
|
||||
// don't change this :)
|
||||
//noinspection GradleDependency
|
||||
implementation 'com.googlecode.mp4parser:isoparser:1.0.6'
|
||||
|
||||
implementation 'com.stripe:stripe-android:2.0.2'
|
||||
implementation 'com.google.code.gson:gson:2.8.6'
|
||||
implementation 'org.osmdroid:osmdroid-android:6.1.8'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10'
|
||||
@ -301,7 +298,7 @@ android {
|
||||
sourceSets {
|
||||
|
||||
main {
|
||||
jni.srcDirs = ['./jni/']
|
||||
jni.srcDirs = []
|
||||
}
|
||||
|
||||
debug {
|
||||
@ -359,13 +356,6 @@ android {
|
||||
}
|
||||
|
||||
sourceSets.all { set ->
|
||||
if (set.name.startsWith("full")) {
|
||||
set.dependencies {
|
||||
implementation files('libs/libv2ray.aar')
|
||||
implementation files('libs/ss-rust-release.aar')
|
||||
implementation files('libs/ssr-libev-release.aar')
|
||||
}
|
||||
}
|
||||
if (set.name.matches("(mini|full).*")) {
|
||||
if (set.name.contains("Apple")) {
|
||||
set.assets.srcDirs = ["src/main/assets", "src/emojis/apple"]
|
||||
@ -394,6 +384,12 @@ android {
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
fullImplementation files('libs/libv2ray.aar','libs/ss-rust-release.aar','libs/ssr-libev-release.aar')
|
||||
|
||||
}
|
||||
|
||||
apply plugin: 'com.google.gms.google-services'
|
||||
apply plugin: 'com.google.firebase.crashlytics'
|
||||
|
||||
|
@ -372,27 +372,6 @@
|
||||
<service
|
||||
android:name=".NotificationRepeat"
|
||||
android:exported="false" />
|
||||
<service
|
||||
android:name=".VideoEncodingService"
|
||||
android:enabled="true" />
|
||||
<service
|
||||
android:name=".LocationSharingService"
|
||||
android:enabled="true"
|
||||
android:foregroundServiceType="location" />
|
||||
<service
|
||||
android:name=".voip.VoIPService"
|
||||
android:enabled="true" />
|
||||
<service
|
||||
android:name=".MusicPlayerService"
|
||||
android:enabled="true"
|
||||
android:exported="true" />
|
||||
<service
|
||||
android:name=".MusicBrowserService"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.service.notification.NotificationListenerService" />
|
||||
</intent-filter>
|
||||
</service>
|
||||
<service
|
||||
android:name="tw.nekomimi.nekogram.NekoXPushService"
|
||||
android:enabled="true"
|
||||
|
@ -3675,21 +3675,21 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||
|
||||
if (totalBlockedCount == 0) return;
|
||||
|
||||
if (blockedUsers.size() == 0) getBlockedUsers(true);
|
||||
if (blockePeers.size() == 0) getBlockedPeers(true);
|
||||
|
||||
SparseIntArray blockedCopy = blockedUsers.clone();
|
||||
SparseIntArray blockedCopy = blockePeers.clone();
|
||||
|
||||
if (blockedCopy.size() == 0) return;
|
||||
|
||||
for (int index = 0; index < blockedCopy.size(); index++) {
|
||||
|
||||
TLRPC.TL_contacts_unblock req = new TLRPC.TL_contacts_unblock();
|
||||
int user_id = blockedCopy.keyAt(index);
|
||||
req.id = getInputUser(user_id);
|
||||
int peer_id = blockedCopy.keyAt(index);
|
||||
req.id = getInputPeer(peer_id);
|
||||
getConnectionsManager().sendRequest(req, (response, error) -> {
|
||||
|
||||
totalBlockedCount--;
|
||||
blockedUsers.delete(user_id);
|
||||
blockePeers.delete(peer_id);
|
||||
|
||||
UIUtil.runOnUIThread(() -> getNotificationCenter().postNotificationName(NotificationCenter.blockedUsersDidLoad));
|
||||
|
||||
|
@ -1902,7 +1902,7 @@ public class SendMessagesHelper extends BaseController implements NotificationCe
|
||||
if (!messageObject.isGif() && (videoEditedInfo == null || !videoEditedInfo.muted)) {
|
||||
uploadedDocument.nosound_video = true;
|
||||
if (BuildVars.DEBUG_VERSION) {
|
||||
FileLog.e("nosound_video = true");
|
||||
FileLog.d("nosound_video = true");
|
||||
}
|
||||
}
|
||||
if (document.access_hash == 0) {
|
||||
@ -5554,7 +5554,7 @@ public class SendMessagesHelper extends BaseController implements NotificationCe
|
||||
sendingMedia.geo = new TLRPC.TL_geoPoint();
|
||||
sendingMedia.geo.lat = location.getLatitude();
|
||||
sendingMedia.geo._long = location.getLongitude();
|
||||
accountInstance.getSendMessagesHelper().sendMessage(sendingMedia, dialog_id, null, null, null, true, 0);
|
||||
accountInstance.getSendMessagesHelper().sendMessage(sendingMedia, dialog_id, null, null, null, null, true, 0);
|
||||
})));
|
||||
}
|
||||
|
||||
|
@ -1935,7 +1935,11 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
|
||||
return getText(page, parentView, parentRichText, richText, parentBlock, maxWidth, false);
|
||||
}
|
||||
|
||||
private CharSequence getText(TLRPC.WebPage page, View parentView, TLRPC.RichText parentRichText, TLRPC.RichText richText, TLRPC.PageBlock parentBlock, int maxWidth, boolean noTranslate) {
|
||||
public CharSequence getText(WebpageAdapter adapter, View parentView, TLRPC.RichText parentRichText, TLRPC.RichText richText, TLRPC.PageBlock parentBlock, int maxWidth, boolean noTranslate) {
|
||||
return getText(adapter.currentPage, parentView, parentRichText, richText, parentBlock, maxWidth, noTranslate);
|
||||
}
|
||||
|
||||
public CharSequence getText(TLRPC.WebPage page, View parentView, TLRPC.RichText parentRichText, TLRPC.RichText richText, TLRPC.PageBlock parentBlock, int maxWidth, boolean noTranslate) {
|
||||
if (richText == null) {
|
||||
return null;
|
||||
}
|
||||
@ -1973,7 +1977,7 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
|
||||
return spannableStringBuilder;
|
||||
} else if (richText instanceof TLRPC.TL_textPlain) {
|
||||
String plainText = ((TLRPC.TL_textPlain) richText).text;
|
||||
if (!noTranslate && StrUtil.isNotBlank(plainText) && adapter.trans && TranslateDb.currentTarget().contains(plainText)) {
|
||||
if (!noTranslate && StrUtil.isNotBlank(plainText) && adapter[0].trans && TranslateDb.currentTarget().contains(plainText)) {
|
||||
plainText = TranslateDb.currentTarget().query(plainText);
|
||||
}
|
||||
return plainText;
|
||||
@ -4823,7 +4827,7 @@ public class ArticleViewer implements NotificationCenter.NotificationCenterDeleg
|
||||
}
|
||||
}
|
||||
|
||||
private class WebpageAdapter extends RecyclerListView.SelectionAdapter {
|
||||
public class WebpageAdapter extends RecyclerListView.SelectionAdapter {
|
||||
|
||||
private Context context;
|
||||
private ArrayList<TLRPC.PageBlock> localBlocks = new ArrayList<>();
|
||||
|
@ -758,8 +758,8 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate
|
||||
private int currentFocusedVirtualView = -1;
|
||||
|
||||
private boolean isBlockedUserMessage() {
|
||||
return MessagesController.getInstance(currentAccount).blockedUsers.indexOfKey(
|
||||
currentMessageObject.getFromId()) >= 0 && NekoConfig.ignoreBlocked;
|
||||
return MessagesController.getInstance(currentAccount).blockePeers.indexOfKey(
|
||||
currentMessageObject.getFromChatId()) >= 0 && NekoConfig.ignoreBlocked;
|
||||
}
|
||||
|
||||
public ChatMessageCell(Context context) {
|
||||
|
@ -22,6 +22,7 @@ import android.app.PendingIntent;
|
||||
import android.content.ClipData;
|
||||
import android.content.ClipboardManager;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentSender;
|
||||
import android.content.SharedPreferences;
|
||||
@ -78,6 +79,7 @@ import android.view.WindowManager;
|
||||
import android.view.accessibility.AccessibilityEvent;
|
||||
import android.view.accessibility.AccessibilityNodeInfo;
|
||||
import android.view.animation.DecelerateInterpolator;
|
||||
import android.widget.DatePicker;
|
||||
import android.widget.EditText;
|
||||
import android.widget.FrameLayout;
|
||||
import android.widget.ImageView;
|
||||
@ -762,10 +764,10 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (textLayout != null) {
|
||||
int lineWidth = (int) Math.ceil(textLayout.getLineWidth(0));
|
||||
int contentWidth;
|
||||
if (getMeasuredWidth() == ((View)getParent()).getMeasuredWidth()) {
|
||||
if (getMeasuredWidth() == ((View) getParent()).getMeasuredWidth()) {
|
||||
contentWidth = getMeasuredWidth() - AndroidUtilities.dp(96);
|
||||
} else {
|
||||
if (botInfo != null) {
|
||||
if (botInfo != null) {
|
||||
contentWidth = getMeasuredWidth();
|
||||
} else {
|
||||
contentWidth = lineWidth + (circleWidth > 0 ? circleWidth + AndroidUtilities.dp(8) : 0);
|
||||
@ -1748,11 +1750,11 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
undoView.showWithAction(dialog_id, id == clear_history ? UndoView.ACTION_CLEAR : UndoView.ACTION_DELETE, () -> {
|
||||
if (chatInfo != null && chatInfo.pinned_msg_id != 0) {
|
||||
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
|
||||
preferences.edit().putInt("pin_" + dialog_id, chatInfo.pinned_msg_id).apply();
|
||||
preferences.edit().putInt("pin_" + dialog_id, chatInfo.pinned_msg_id).apply();
|
||||
updatePinnedMessageView(true);
|
||||
} else if (userInfo != null && userInfo.pinned_msg_id != 0) {
|
||||
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
|
||||
preferences.edit().putInt("pin_" + dialog_id, userInfo.pinned_msg_id).apply();
|
||||
preferences.edit().putInt("pin_" + dialog_id, userInfo.pinned_msg_id).apply();
|
||||
updatePinnedMessageView(true);
|
||||
}
|
||||
getMessagesController().deleteDialog(dialog_id, 1, param);
|
||||
@ -2216,7 +2218,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
actionMode.getItem(edit).setVisibility(canEditMessagesCount == 1 && selectedMessagesIds[0].size() + selectedMessagesIds[1].size() == 1 ? View.VISIBLE : View.GONE);
|
||||
actionMode.getItem(copy).setVisibility(selectedMessagesCanCopyIds[0].size() + selectedMessagesCanCopyIds[1].size() != 0 ? View.VISIBLE : View.GONE);
|
||||
actionMode.getItem(star).setVisibility(View.GONE);
|
||||
actionMode.getItem(delete).setVisibility(cantDeleteMessagesCount == 0 ? View.VISIBLE : View.GONE);
|
||||
actionMode.getItem(delete).setVisibility(cantDeleteMessagesCount > 0 && selectedMessagesIds[0].size() + selectedMessagesIds[1].size() > 1 ? View.VISIBLE : View.GONE);
|
||||
|
||||
checkActionBarMenu();
|
||||
|
||||
scrimPaint = new Paint() {
|
||||
@ -2472,7 +2475,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (backgroundColor != color) {
|
||||
backgroundPaint.setColor(backgroundColor = color);
|
||||
}
|
||||
int offset = (int) (bottomPanelTranslationY - chatActivityEnterView.getEmojiPadding()) + 3;
|
||||
int offset = (int) (bottomPanelTranslationY - chatActivityEnterView.getEmojiPadding()) + 3;
|
||||
canvas.drawRect(0, getMeasuredHeight() - offset, getMeasuredWidth(), getMeasuredHeight(), backgroundPaint);
|
||||
setFragmentPanTranslationOffset(chatActivityEnterView.getEmojiPadding());
|
||||
}
|
||||
@ -2646,7 +2649,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
heightSize -= actionBarHeight;
|
||||
}
|
||||
|
||||
if (lastHeight != allHeight ) {
|
||||
if (lastHeight != allHeight) {
|
||||
measureKeyboardHeight();
|
||||
}
|
||||
int keyboardSize = getKeyboardHeight();
|
||||
@ -3852,7 +3855,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (child.getTranslationY() != 0) {
|
||||
canvas.restore();
|
||||
}
|
||||
imageReceiver.setVisible(false, false);
|
||||
imageReceiver.setVisible(false, false);
|
||||
return result;
|
||||
}
|
||||
} else {
|
||||
@ -7510,7 +7513,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
|
||||
String str = StrUtil.utf8Str(os.toByteArray());
|
||||
if (StrUtil.isBlank(str)) return;
|
||||
getSendMessagesHelper().sendMessage(str, dialog_id, null, null, false, null, null, null, true, 0);
|
||||
getSendMessagesHelper().sendMessage(str, dialog_id, null, null, null,
|
||||
false, null, null, null, true, 0);
|
||||
if (!inScheduleMode) {
|
||||
moveScrollToLastMessage();
|
||||
}
|
||||
@ -9288,7 +9292,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (viewBottom > height) {
|
||||
viewBottom = viewTop + height;
|
||||
}
|
||||
messageCell.setVisiblePart(viewTop, viewBottom - viewTop, recyclerChatViewHeight, contentView.getKeyboardHeight());
|
||||
messageCell.setVisiblePart(viewTop, viewBottom - viewTop, recyclerChatViewHeight, contentView.getKeyboardHeight());
|
||||
|
||||
messageObject = messageCell.getMessageObject();
|
||||
if (!replyMessageVisible && threadMessageObject != null && messageObject == threadMessageObject && messageCell.getBottom() > chatListView.getPaddingTop()) {
|
||||
@ -14876,12 +14880,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
|
||||
if (threadMessageObject == null && (chatInfo == null && userInfo == null || pinned_msg_id == 0 || actionBar != null && (actionBar.isActionModeShowed() || actionBar.isSearchFieldVisible()))) {
|
||||
changed = hidePinnedMessageView(animated);
|
||||
headerItem.hideSubItem(show_pinned);
|
||||
if (headerItem != null) headerItem.hideSubItem(show_pinned);
|
||||
} else if (pinned_msg_id == preferences.getInt("pin_" + dialog_id, 0)) {
|
||||
changed = hidePinnedMessageView(animated);
|
||||
headerItem.showSubItem(show_pinned);
|
||||
if (headerItem != null) headerItem.showSubItem(show_pinned);
|
||||
} else {
|
||||
headerItem.hideSubItem(show_pinned);
|
||||
if (headerItem != null) headerItem.hideSubItem(show_pinned);
|
||||
if (pinnedMessageObject != null) {
|
||||
if (pinnedMessageView.getTag() != null) {
|
||||
pinnedMessageView.setTag(null);
|
||||
@ -15186,10 +15190,12 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
}
|
||||
|
||||
if (StrUtil.isBlank(NekoConfig.openPGPApp)) {
|
||||
shareKeyItem.setVisibility(View.GONE);
|
||||
} else {
|
||||
shareKeyItem.setVisibility(View.VISIBLE);
|
||||
if (shareKeyItem != null) {
|
||||
if (StrUtil.isBlank(NekoConfig.openPGPApp)) {
|
||||
shareKeyItem.setVisibility(View.GONE);
|
||||
} else {
|
||||
shareKeyItem.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
if (userBlocked || addToContactsButton.getVisibility() == View.GONE && reportSpamButton.getVisibility() == View.GONE) {
|
||||
@ -16160,7 +16166,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (message.canDeleteMessage(inScheduleMode, currentChat) && (threadMessageObjects == null || !threadMessageObjects.contains(message))) {
|
||||
items.add(LocaleController.getString("Delete", R.string.Delete));
|
||||
options.add(1);
|
||||
icons.add(R.drawable.baseline_delete_24);
|
||||
icons.add(R.drawable.baseline_delete_24);
|
||||
}
|
||||
} else if (type == 20) {
|
||||
items.add(LocaleController.getString("Retry", R.string.Retry));
|
||||
@ -16593,7 +16599,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (chatInfo != null && chatInfo.participants != null && chatInfo.participants.participants != null) {
|
||||
for (int a = 0; a < chatInfo.participants.participants.size(); a++) {
|
||||
TLRPC.ChatParticipant participant = chatInfo.participants.participants.get(a);
|
||||
if (participant.user_id != selectedObject.messageOwner.from_id || participant.user_id == getUserConfig().getCurrentUser().id) {
|
||||
if (participant.user_id != selectedObject.messageOwner.from_id.user_id || participant.user_id == getUserConfig().getCurrentUser().id) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -17558,8 +17564,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
break;
|
||||
}
|
||||
case 90: {
|
||||
TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(selectedObject.messageOwner.from_id);
|
||||
getMediaDataController().searchMessagesInChat("", dialog_id, mergeDialogId, classGuid, 0, user);
|
||||
TLRPC.User user = MessagesController.getInstance(currentAccount).getUser(selectedObject.messageOwner.from_id.user_id);
|
||||
getMediaDataController().searchMessagesInChat("", dialog_id, mergeDialogId, classGuid, 0, 0, user);
|
||||
showMessagesSearchListView(true);
|
||||
break;
|
||||
}
|
||||
@ -17807,8 +17813,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
toSend.append(c);
|
||||
}
|
||||
}
|
||||
SendMessagesHelper.getInstance(currentAccount).sendMessage(toSend.toString(), dialog_id, selectedObject, null, false,
|
||||
null, null, null, true, 0);
|
||||
SendMessagesHelper.getInstance(currentAccount).sendMessage(toSend.toString(), dialog_id, selectedObject, null, null,
|
||||
false, null, null, null, true, 0);
|
||||
return 2;
|
||||
}
|
||||
}
|
||||
@ -19514,7 +19520,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
boolean handled = false;
|
||||
if (message.canPreviewDocument()) {
|
||||
PhotoViewer.getInstance().setParentActivity(getParentActivity());
|
||||
PhotoViewer.getInstance().openPhoto(message, message.type != 0 ? dialog_id : 0, message.type != 0 ? mergeDialogId : 0, photoViewerProvider);
|
||||
PhotoViewer.getInstance().openPhoto(message, message.type != 0 ? dialog_id : 0, message.type != 0 ? mergeDialogId : 0, photoViewerProvider, false);
|
||||
handled = true;
|
||||
}
|
||||
if (!handled) {
|
||||
@ -19765,7 +19771,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
} else if (position >= messagesStartRow && position < messagesEndRow) {
|
||||
MessageObject message = messages.get(position - messagesStartRow);
|
||||
View view = holder.itemView;
|
||||
boolean fromUserBlocked = getMessagesController().blockedUsers.indexOfKey(message.getFromId()) >= 0 && NekoConfig.ignoreBlocked;
|
||||
boolean fromUserBlocked = getMessagesController().blockePeers.indexOfKey(message.getFromChatId()) >= 0 && NekoConfig.ignoreBlocked;
|
||||
|
||||
if (view instanceof ChatMessageCell) {
|
||||
final ChatMessageCell messageCell = (ChatMessageCell) view;
|
||||
@ -21050,7 +21056,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
for (int a = 0; a < chatInfo.participants.participants.size(); a++) {
|
||||
TLRPC.ChatParticipant participant = chatInfo.participants.participants.get(a);
|
||||
if (participant.user_id != selectedObject.messageOwner.from_id || participant.user_id == getUserConfig().getCurrentUser().id) {
|
||||
if (participant.user_id != selectedObject.messageOwner.from_id.user_id || participant.user_id == getUserConfig().getCurrentUser().id) {
|
||||
continue;
|
||||
}
|
||||
final TLRPC.ChannelParticipant channelParticipant;
|
||||
|
@ -1537,7 +1537,7 @@ private int lastMeasuredTopPadding;
|
||||
super.onFragmentCreate();
|
||||
|
||||
getConnectionsManager().updateDcSettings();
|
||||
getMessagesController().getBlockedUsers(true);
|
||||
getMessagesController().getBlockedPeers(true);
|
||||
|
||||
if (getArguments() != null) {
|
||||
onlySelect = arguments.getBoolean("onlySelect", false);
|
||||
|
@ -327,7 +327,7 @@ public class DocumentSelectActivity extends BaseFragment {
|
||||
|
||||
selectedFiles.clear();
|
||||
|
||||
sizeNotifierFrameLayout = new SizeNotifierFrameLayout(context, SharedConfig.smoothKeyboard) {
|
||||
sizeNotifierFrameLayout = new SizeNotifierFrameLayout(context, parentLayout) {
|
||||
|
||||
private int lastNotifyWidth;
|
||||
private boolean ignoreLayout;
|
||||
@ -355,12 +355,6 @@ public class DocumentSelectActivity extends BaseFragment {
|
||||
ignoreLayout = false;
|
||||
}
|
||||
|
||||
if (SharedConfig.smoothKeyboard && commentTextView != null && commentTextView.isPopupShowing()) {
|
||||
fragmentView.setTranslationY(getCurrentPanTranslationY());
|
||||
listView.setTranslationY(0);
|
||||
emptyView.setTranslationY(0);
|
||||
}
|
||||
|
||||
int childCount = getChildCount();
|
||||
for (int i = 0; i < childCount; i++) {
|
||||
View child = getChildAt(i);
|
||||
@ -887,21 +881,6 @@ public class DocumentSelectActivity extends BaseFragment {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onPanTranslationUpdate(int y) {
|
||||
if (listView == null) {
|
||||
return;
|
||||
}
|
||||
if (commentTextView.isPopupShowing()) {
|
||||
fragmentView.setTranslationY(y);
|
||||
listView.setTranslationY(0);
|
||||
emptyView.setTranslationY(0);
|
||||
} else {
|
||||
listView.setTranslationY(y);
|
||||
emptyView.setTranslationY(y);
|
||||
}
|
||||
}
|
||||
|
||||
private boolean onItemClick(View view, ListItem item) {
|
||||
if (item == null || item.file == null || item.file.isDirectory()) {
|
||||
return false;
|
||||
@ -1541,7 +1520,7 @@ public class DocumentSelectActivity extends BaseFragment {
|
||||
view = headerCell;
|
||||
break;
|
||||
case 1:
|
||||
view = new SharedDocumentCell(mContext, true);
|
||||
view = new SharedDocumentCell(mContext, SharedDocumentCell.VIEW_TYPE_PICKER);
|
||||
break;
|
||||
case 2:
|
||||
default:
|
||||
@ -1683,7 +1662,7 @@ public class DocumentSelectActivity extends BaseFragment {
|
||||
|
||||
@Override
|
||||
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
|
||||
View view = new SharedDocumentCell(mContext, true);
|
||||
View view = new SharedDocumentCell(mContext, SharedDocumentCell.VIEW_TYPE_PICKER);
|
||||
return new RecyclerListView.Holder(view);
|
||||
}
|
||||
|
||||
|
@ -58,9 +58,6 @@ import androidx.recyclerview.widget.ItemTouchHelper;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.firebase.appindexing.Action;
|
||||
import com.google.firebase.appindexing.FirebaseUserActions;
|
||||
import com.google.firebase.appindexing.builders.AssistActionBuilder;
|
||||
import com.v2ray.ang.V2RayConfig;
|
||||
|
||||
import org.telegram.PhoneFormat.PhoneFormat;
|
||||
@ -1559,7 +1556,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
Integer threadId = null;
|
||||
Integer commentId = null;
|
||||
boolean hasUrl = false;
|
||||
finalString scheme = data.getScheme();
|
||||
final String scheme = data.getScheme();
|
||||
boolean internal = intent.getExtras() != null && intent.getExtras().get("internal") != null && (boolean) intent.getExtras().get("internal");
|
||||
if (scheme != null) {
|
||||
switch (scheme) {
|
||||
@ -2021,7 +2018,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
}
|
||||
}
|
||||
}
|
||||
if (intent.hasExtra(EXTRA_ACTION_TOKEN)) {
|
||||
/*if (intent.hasExtra(EXTRA_ACTION_TOKEN)) {
|
||||
final boolean success = UserConfig.getInstance(currentAccount).isClientActivated() && "tg".equals(scheme) && unsupportedUrl == null;
|
||||
final Action action = new AssistActionBuilder()
|
||||
.setActionToken(intent.getStringExtra(EXTRA_ACTION_TOKEN))
|
||||
@ -2029,7 +2026,7 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
.build();
|
||||
FirebaseUserActions.getInstance().end(action);
|
||||
intent.removeExtra(EXTRA_ACTION_TOKEN);
|
||||
}
|
||||
}*/
|
||||
if (code != null || UserConfig.getInstance(currentAccount).isClientActivated()) {
|
||||
if (phone != null || phoneHash != null) {
|
||||
final Bundle args = new Bundle();
|
||||
@ -3979,7 +3976,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
if (!toDark) {
|
||||
darkThemeView.setVisibility(View.VISIBLE);
|
||||
}
|
||||
DrawerProfileCell.switchingTheme = false;
|
||||
}
|
||||
});
|
||||
anim.start();
|
||||
@ -3989,7 +3985,6 @@ public class LaunchActivity extends Activity implements ActionBarLayout.ActionBa
|
||||
try {
|
||||
themeSwitchImageView.setImageDrawable(null);
|
||||
frameLayout.removeView(themeSwitchImageView);
|
||||
DrawerProfileCell.switchingTheme = false;
|
||||
} catch (Exception e2) {
|
||||
FileLog.e(e2);
|
||||
}
|
||||
|
@ -352,7 +352,7 @@ public class LoginActivity extends BaseFragment implements NotificationCenter.No
|
||||
MessagesStorage.getInstance(currentAccount).putUsersAndChats(users, null, true, true);
|
||||
MessagesController.getInstance(currentAccount).putUser(res.user, false);
|
||||
ContactsController.getInstance(currentAccount).checkAppAccount();
|
||||
MessagesController.getInstance(currentAccount).getBlockedUsers(true);
|
||||
MessagesController.getInstance(currentAccount).getBlockedPeers(true);
|
||||
MessagesController.getInstance(currentAccount).checkPromoInfo(true);
|
||||
ConnectionsManager.getInstance(currentAccount).updateDcSettings();
|
||||
needFinishActivity(false);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1841,6 +1841,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
listView.stopScroll();
|
||||
avatarContainer.setVisibility(expanded ? INVISIBLE : VISIBLE);
|
||||
nameTextView[1].setVisibility(expanded ? INVISIBLE : VISIBLE);
|
||||
idTextView.setVisibility(expanded ? INVISIBLE : VISIBLE);
|
||||
onlineTextView[1].setVisibility(expanded ? INVISIBLE : VISIBLE);
|
||||
onlineTextView[2].setVisibility(expanded ? INVISIBLE : VISIBLE);
|
||||
callItem.setVisibility(expanded || !callItemVisible ? GONE : INVISIBLE);
|
||||
@ -4098,7 +4099,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
nameTextView[a].setScaleY(nameScale);
|
||||
}
|
||||
|
||||
if (diff > 0.85 && NekoConfig.showIdAndDc) {
|
||||
if (diff > 0.85 && !searchMode && NekoConfig.showIdAndDc) {
|
||||
idTextView.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
idTextView.setVisibility(View.GONE);
|
||||
@ -5785,6 +5786,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
avatarContainer.setAlpha(progressHalf);
|
||||
nameTextView[1].setAlpha(progressHalf);
|
||||
onlineTextView[1].setAlpha(progressHalf);
|
||||
idTextView.setAlpha(progressHalf);
|
||||
|
||||
searchItem.getSearchField().setAlpha(progressHalfEnd);
|
||||
if (enter && searchTransitionProgress < 0.7f) {
|
||||
@ -5846,6 +5848,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
avatarContainer.setAlpha(1f);
|
||||
nameTextView[1].setAlpha(1f);
|
||||
onlineTextView[1].setAlpha(1f);
|
||||
idTextView.setAlpha(1f);
|
||||
searchItem.setAlpha(1f);
|
||||
listView.setAlpha(1f);
|
||||
searchListView.setAlpha(1f);
|
||||
|
@ -121,13 +121,13 @@ public class MessageDetailsActivity extends BaseFragment implements Notification
|
||||
|
||||
public MessageDetailsActivity(MessageObject messageObject) {
|
||||
this.messageObject = messageObject;
|
||||
if (messageObject.messageOwner.to_id != null && messageObject.messageOwner.to_id.channel_id != 0) {
|
||||
fromChat = getMessagesController().getChat(messageObject.messageOwner.to_id.channel_id);
|
||||
} else if (messageObject.messageOwner.to_id != null && messageObject.messageOwner.to_id.chat_id != 0) {
|
||||
fromChat = getMessagesController().getChat(messageObject.messageOwner.to_id.chat_id);
|
||||
if (messageObject.messageOwner.peer_id != null && messageObject.messageOwner.peer_id.channel_id != 0) {
|
||||
fromChat = getMessagesController().getChat(messageObject.messageOwner.peer_id.channel_id);
|
||||
} else if (messageObject.messageOwner.peer_id != null && messageObject.messageOwner.peer_id.chat_id != 0) {
|
||||
fromChat = getMessagesController().getChat(messageObject.messageOwner.peer_id.chat_id);
|
||||
}
|
||||
if (messageObject.messageOwner.from_id != 0) {
|
||||
fromUser = getMessagesController().getUser(messageObject.messageOwner.from_id);
|
||||
if (messageObject.messageOwner.from_id.user_id != 0) {
|
||||
fromUser = getMessagesController().getUser(messageObject.messageOwner.from_id.user_id);
|
||||
}
|
||||
filePath = messageObject.messageOwner.attachPath;
|
||||
if (!TextUtils.isEmpty(filePath)) {
|
||||
@ -433,8 +433,8 @@ public class MessageDetailsActivity extends BaseFragment implements Notification
|
||||
textCell.setTextAndValue("Edited", LocaleController.formatString("formatDateAtTime", R.string.formatDateAtTime, LocaleController.getInstance().formatterYear.format(new Date(date)), LocaleController.getInstance().formatterDay.format(new Date(date))), divider);
|
||||
} else if (position == forwardRow) {
|
||||
StringBuilder builder = new StringBuilder();
|
||||
if (messageObject.messageOwner.fwd_from.channel_id != 0) {
|
||||
TLRPC.Chat chat = getMessagesController().getChat(messageObject.messageOwner.fwd_from.channel_id);
|
||||
if (messageObject.messageOwner.fwd_from.from_id.channel_id != 0) {
|
||||
TLRPC.Chat chat = getMessagesController().getChat(messageObject.messageOwner.fwd_from.from_id.channel_id);
|
||||
builder.append(chat.title);
|
||||
builder.append("\n");
|
||||
if (!TextUtils.isEmpty(chat.username)) {
|
||||
@ -443,8 +443,8 @@ public class MessageDetailsActivity extends BaseFragment implements Notification
|
||||
builder.append("\n");
|
||||
}
|
||||
builder.append(chat.id);
|
||||
} else if (messageObject.messageOwner.fwd_from.from_id != 0) {
|
||||
TLRPC.User user = getMessagesController().getUser(messageObject.messageOwner.fwd_from.from_id);
|
||||
} else if (messageObject.messageOwner.fwd_from.from_id.user_id != 0) {
|
||||
TLRPC.User user = getMessagesController().getUser(messageObject.messageOwner.fwd_from.from_id.channel_id);
|
||||
builder.append(ContactsController.formatName(user.first_name, user.last_name));
|
||||
builder.append("\n");
|
||||
if (!TextUtils.isEmpty(user.username)) {
|
||||
|
@ -89,8 +89,8 @@ public class MessageHelper extends BaseController {
|
||||
if (message.random_id != 0) {
|
||||
random_ids.add(message.random_id);
|
||||
}
|
||||
if (message.to_id.channel_id != 0) {
|
||||
channelId = message.to_id.channel_id;
|
||||
if (message.peer_id.channel_id != 0) {
|
||||
channelId = message.peer_id.channel_id;
|
||||
}
|
||||
if (message.id > lastMessageId) {
|
||||
lastMessageId = message.id;
|
||||
@ -150,8 +150,8 @@ public class MessageHelper extends BaseController {
|
||||
for (int a = 0; a < res.messages.size(); a++) {
|
||||
TLRPC.Message message = res.messages.get(a);
|
||||
ids.add(message.id);
|
||||
if (message.from_id > 0) {
|
||||
ids.add(message.from_id);
|
||||
if (message.from_id.user_id > 0) {
|
||||
ids.add(message.peer_id.user_id);
|
||||
} else {
|
||||
msgIds.add(message.id);
|
||||
if (message.random_id != 0) {
|
||||
@ -180,7 +180,7 @@ public class MessageHelper extends BaseController {
|
||||
|
||||
public void deleteUserChannelHistory(final TLRPC.Chat chat, int userId, int offset) {
|
||||
if (offset == 0) {
|
||||
getMessagesStorage().deleteUserChannelHistory(chat.id, userId);
|
||||
getMessagesStorage().deleteUserChatHistory(chat.id, chat.id, userId);
|
||||
}
|
||||
TLRPC.TL_channels_deleteUserHistory req = new TLRPC.TL_channels_deleteUserHistory();
|
||||
req.channel = getMessagesController().getInputChannel(chat.id);
|
||||
|
@ -55,7 +55,8 @@ public class StickerSizePreviewMessagesCell extends LinearLayout {
|
||||
message.date = date + 10;
|
||||
message.dialog_id = 1;
|
||||
message.flags = 257;
|
||||
message.from_id = UserConfig.getInstance(UserConfig.selectedAccount).getClientUserId();
|
||||
message.from_id = new TLRPC.TL_peerUser();
|
||||
message.from_id.user_id = UserConfig.getInstance(UserConfig.selectedAccount).getClientUserId();
|
||||
message.id = 1;
|
||||
message.media = new TLRPC.TL_messageMediaDocument();
|
||||
message.media.flags = 1;
|
||||
@ -73,8 +74,8 @@ public class StickerSizePreviewMessagesCell extends LinearLayout {
|
||||
message.media.document.attributes.add(attributeImageSize);
|
||||
message.message = "";
|
||||
message.out = true;
|
||||
message.to_id = new TLRPC.TL_peerUser();
|
||||
message.to_id.user_id = 0;
|
||||
message.peer_id = new TLRPC.TL_peerUser();
|
||||
message.peer_id.user_id = 0;
|
||||
messageObjects[0] = new MessageObject(UserConfig.selectedAccount, message, true, false);
|
||||
messageObjects[0].useCustomPhoto = true;
|
||||
|
||||
@ -86,8 +87,8 @@ public class StickerSizePreviewMessagesCell extends LinearLayout {
|
||||
message.id = 2;
|
||||
message.media = new TLRPC.TL_messageMediaEmpty();
|
||||
message.out = false;
|
||||
message.to_id = new TLRPC.TL_peerUser();
|
||||
message.to_id.user_id = 1;
|
||||
message.peer_id = new TLRPC.TL_peerUser();
|
||||
message.peer_id.user_id = 1;
|
||||
messageObjects[0].customReplyName = LocaleController.getString("StickerSizeDialogName", R.string.StickerSizeDialogName);
|
||||
messageObjects[0].replyMessageObject = new MessageObject(UserConfig.selectedAccount, message, true, false);
|
||||
|
||||
@ -100,8 +101,8 @@ public class StickerSizePreviewMessagesCell extends LinearLayout {
|
||||
message.id = 2;
|
||||
message.media = new TLRPC.TL_messageMediaEmpty();
|
||||
message.out = false;
|
||||
message.to_id = new TLRPC.TL_peerUser();
|
||||
message.to_id.user_id = 1;
|
||||
message.peer_id = new TLRPC.TL_peerUser();
|
||||
message.peer_id.user_id = 1;
|
||||
messageObjects[1] = new MessageObject(UserConfig.selectedAccount, message, true, false);
|
||||
TLRPC.User currentUser = MessagesController.getInstance(UserConfig.selectedAccount).getUser(UserConfig.getInstance(UserConfig.selectedAccount).getClientUserId());
|
||||
messageObjects[1].customReplyName = ContactsController.formatName(currentUser.first_name, currentUser.last_name);
|
||||
|
@ -64,7 +64,6 @@ object AlertUtil {
|
||||
})
|
||||
|
||||
@JvmStatic
|
||||
@JvmOverloads
|
||||
fun showSimpleAlert(ctx: Context?, error: Throwable) {
|
||||
|
||||
showSimpleAlert(ctx, null, error.message ?: error.javaClass.simpleName) {}
|
||||
|
@ -1,19 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
V2RAY_CORE_VERSION="4.30.0"
|
||||
|
||||
if [ ! -x "$(command -v go)" ]; then
|
||||
|
||||
# if [ ! -x "$(command -v gvm)" ]; then
|
||||
#
|
||||
# apt install -y bison
|
||||
#
|
||||
# bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
|
||||
#
|
||||
# source "$HOME/.bashrc"
|
||||
#
|
||||
# fi
|
||||
#
|
||||
# gvm install go1.14 -B
|
||||
# gvm use go1.14 --default
|
||||
# gvm install go1.15 -B
|
||||
# gvm use go1.15 --default
|
||||
|
||||
echo "install golang please!"
|
||||
|
||||
@ -24,9 +24,7 @@ fi
|
||||
if [ ! -x "$(command -v rustc)" ]; then
|
||||
|
||||
# curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
|
||||
# source $HOME/.cargo/env
|
||||
|
||||
# echo "source \$HOME/.cargo/env" >> $HOME/.bashrc && source $HOME/.cargo/env
|
||||
# rustup target install armv7-linux-androideabi aarch64-linux-android i686-linux-android x86_64-linux-android
|
||||
|
||||
echo "install rust please!"
|
||||
@ -60,7 +58,7 @@ go get -v golang.org/x/mobile/cmd/... &&
|
||||
v2rayCore="$(go env GOPATH)/src/v2ray.com/core" &&
|
||||
rm -rf "$v2rayCore" &&
|
||||
mkdir -p "$v2rayCore" &&
|
||||
git clone https://github.com/v2fly/v2ray-core.git "$v2rayCore" -b "v4.28.2" &&
|
||||
git clone https://github.com/v2fly/v2ray-core.git "$v2rayCore" -b "v$V2RAY_CORE_VERSION" &&
|
||||
go get -d github.com/2dust/AndroidLibV2rayLite &&
|
||||
|
||||
gomobile init &&
|
||||
@ -76,16 +74,16 @@ DIR=TMessagesProj/src/main/libs &&
|
||||
|
||||
rm -rf $DIR/armeabi-v7a &&
|
||||
mkdir -p $DIR/armeabi-v7a &&
|
||||
cp $OUT/armeabi-v7a/*.so $DIR/armeabi-v7a &&
|
||||
cp $OUT/armeabi-v7a/libtmessages*.so $DIR/armeabi-v7a &&
|
||||
|
||||
rm -rf $DIR/arm64-v8a &&
|
||||
mkdir -p $DIR/arm64-v8a &&
|
||||
cp $OUT/arm64-v8a/*.so $DIR/arm64-v8a &&
|
||||
cp $OUT/arm64-v8a/libtmessages*.so $DIR/arm64-v8a &&
|
||||
|
||||
rm -rf $DIR/x86 &&
|
||||
mkdir -p $DIR/x86 &&
|
||||
cp $OUT/x86/*.so $DIR/x86 &&
|
||||
cp $OUT/x86/libtmessages*.so $DIR/x86 &&
|
||||
|
||||
rm -rf $DIR/x86_64 &&
|
||||
mkdir -p $DIR/x86_64 &&
|
||||
cp $OUT/x86_64/*.so $DIR/x86_64
|
||||
cp $OUT/x86_64/libtmessages*.so $DIR/x86_64
|
||||
|
@ -1,21 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
outPath="TMessagesProj/build/outputs/apk/full/release"
|
||||
./gradlew TMessagesProj:assembleFullRelease \
|
||||
TMessagesProj:assembleFullReleaseNoGcm
|
||||
|
||||
for apk in $outPath/*.apk; do
|
||||
trap 'kill $(jobs -p)' SIGINT
|
||||
|
||||
function upload() {
|
||||
|
||||
for apk in $outPath/*.apk; do
|
||||
|
||||
echo ">> Uploading $apk"
|
||||
|
||||
curl https://api.telegram.org/bot${TELEGRAM_TOKEN}/sendDocument \
|
||||
-X POST \
|
||||
-F chat_id="$TELEGRAM_CHANNEL" \
|
||||
-F document="@$apk" \
|
||||
--silent --show-error --fail > /dev/null &
|
||||
-X POST \
|
||||
-F chat_id="$TELEGRAM_CHANNEL" \
|
||||
-F document="@$apk" \
|
||||
--silent --show-error --fail >/dev/null &
|
||||
|
||||
done
|
||||
done
|
||||
|
||||
trap 'kill $(jobs -p)' SIGINT
|
||||
for job in $(jobs -p); do
|
||||
wait $job
|
||||
done
|
||||
|
||||
for job in `jobs -p`; do
|
||||
wait $job
|
||||
done
|
||||
}
|
||||
|
||||
outPath="TMessagesProj/build/outputs/apk/full/release"
|
||||
|
||||
upload
|
||||
|
||||
outPath="TMessagesProj/build/outputs/apk/full/releaseNoGcm"
|
||||
|
||||
upload
|
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
function upload {
|
||||
trap 'kill $(jobs -p)' SIGINT
|
||||
|
||||
function upload() {
|
||||
|
||||
for apk in $outPath/*.apk; do
|
||||
|
||||
@ -10,10 +12,14 @@ function upload {
|
||||
-X POST \
|
||||
-F chat_id="$TELEGRAM_CHANNEL" \
|
||||
-F document="@$apk" \
|
||||
--silent --show-error --fail >/dev/null
|
||||
--silent --show-error --fail >/dev/null &
|
||||
|
||||
done
|
||||
|
||||
for job in $(jobs -p); do
|
||||
wait $job
|
||||
done
|
||||
|
||||
}
|
||||
|
||||
outPath="TMessagesProj/build/outputs/apk/full/release"
|
||||
@ -28,7 +34,6 @@ outPath="TMessagesProj/build/outputs/apk/mini/release"
|
||||
|
||||
upload
|
||||
|
||||
|
||||
outPath="TMessagesProj/build/outputs/apk/mini/releaseNoGcm"
|
||||
|
||||
upload
|
||||
upload
|
||||
|
@ -9,7 +9,7 @@ buildscript {
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10"
|
||||
classpath 'com.google.gms:google-services:4.3.3'
|
||||
classpath 'com.google.gms:google-services:4.3.4'
|
||||
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
|
||||
classpath 'gradle.plugin.org.mozilla.rust-android-gradle:plugin:0.8.3'
|
||||
classpath 'com.github.triplet.gradle:play-publisher:2.8.0'
|
||||
|
Loading…
Reference in New Issue
Block a user