mirror of
https://github.com/DrKLO/Telegram.git
synced 2024-12-22 06:25:14 +01:00
update to 9.2.2
This commit is contained in:
parent
03e899e4ec
commit
2c71f6c92b
7 changed files with 38 additions and 30 deletions
|
@ -24,8 +24,8 @@ public class BuildVars {
|
|||
public static boolean USE_CLOUD_STRINGS = true;
|
||||
public static boolean CHECK_UPDATES = true;
|
||||
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
|
||||
public static int BUILD_VERSION = 2962;
|
||||
public static String BUILD_VERSION_STRING = "9.2.1";
|
||||
public static int BUILD_VERSION = 2965;
|
||||
public static String BUILD_VERSION_STRING = "9.2.2";
|
||||
public static int APP_ID = 4;
|
||||
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
|
||||
|
||||
|
|
|
@ -366,12 +366,12 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter implements
|
|||
hasHints = folderId == 0 && dialogsType == 0 && !isOnlySelect && !MessagesController.getInstance(currentAccount).hintDialogs.isEmpty();
|
||||
}
|
||||
|
||||
public void updateList(RecyclerListView recyclerListView) {
|
||||
public void updateList(RecyclerListView recyclerListView, boolean hasHiddenArchive) {
|
||||
oldItems.clear();
|
||||
oldItems.addAll(itemInternals);
|
||||
updateItemList();
|
||||
|
||||
if (recyclerListView != null && recyclerListView.getChildCount() > 0) {
|
||||
if (recyclerListView != null && recyclerListView.getChildCount() > 0 && recyclerListView.getLayoutManager() != null) {
|
||||
LinearLayoutManager layoutManager = ((LinearLayoutManager) recyclerListView.getLayoutManager());
|
||||
View view = null;
|
||||
int position = -1;
|
||||
|
@ -386,7 +386,12 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter implements
|
|||
}
|
||||
}
|
||||
if (view != null) {
|
||||
layoutManager.scrollToPositionWithOffset(position, view.getTop() - recyclerListView.getPaddingTop());
|
||||
int offset = view.getTop() - recyclerListView.getPaddingTop();
|
||||
if (hasHiddenArchive && position == 0 && view.getTop() - recyclerListView.getPaddingTop() < AndroidUtilities.dp(SharedConfig.useThreeLinesLayout ? 78 : 72)) {
|
||||
position = 1;
|
||||
offset = 0;
|
||||
}
|
||||
layoutManager.scrollToPositionWithOffset(position, offset);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -820,7 +825,7 @@ public class DialogsAdapter extends RecyclerListView.SelectionAdapter implements
|
|||
toDialog.pinnedNum = oldNum;
|
||||
}
|
||||
Collections.swap(dialogs, fromIndex, toIndex);
|
||||
updateList(recyclerView);
|
||||
updateList(recyclerView, false);
|
||||
}
|
||||
@Override
|
||||
public void notifyItemMoved(int fromPosition, int toPosition) {
|
||||
|
|
|
@ -4044,8 +4044,8 @@ public class DialogCell extends BaseCell {
|
|||
int x = countLeftLocal - AndroidUtilities.dp(5.5f);
|
||||
rect.set(x, countTop, x + countWidth + AndroidUtilities.dp(11), countTop + AndroidUtilities.dp(23));
|
||||
|
||||
int restoreToCount = canvas.save();
|
||||
if (globalScale != 1f) {
|
||||
canvas.save();
|
||||
canvas.scale(globalScale, globalScale, rect.centerX(), rect.centerY());
|
||||
}
|
||||
if (progressFinal != 1f) {
|
||||
|
@ -4057,7 +4057,6 @@ public class DialogCell extends BaseCell {
|
|||
Theme.dialogs_pinnedDrawable.draw(canvas);
|
||||
canvas.restore();
|
||||
}
|
||||
canvas.save();
|
||||
canvas.scale(progressFinal, progressFinal, rect.centerX(), rect.centerY());
|
||||
}
|
||||
|
||||
|
@ -4072,12 +4071,7 @@ public class DialogCell extends BaseCell {
|
|||
canvas.restore();
|
||||
}
|
||||
|
||||
if (progressFinal != 1f) {
|
||||
canvas.restore();
|
||||
}
|
||||
if (globalScale != 1f) {
|
||||
canvas.restore();
|
||||
}
|
||||
canvas.restoreToCount(restoreToCount);
|
||||
} else {
|
||||
paint.setAlpha((int) ((1.0f - reorderIconProgress) * fillPaintAlpha));
|
||||
Theme.dialogs_countTextPaint.setAlpha((int) ((1.0f - reorderIconProgress) * 255));
|
||||
|
|
|
@ -14499,7 +14499,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
|||
entry.reset();
|
||||
}
|
||||
fillEditingMediaWithCaption(photos.get(0).caption, photos.get(0).entities);
|
||||
SendMessagesHelper.prepareSendingMedia(getAccountInstance(), photos, dialog_id, null, getThreadMessage(), null, forceDocument, true, null, notify, scheduleDate, photos.get(0).updateStickersOrder);
|
||||
SendMessagesHelper.prepareSendingMedia(getAccountInstance(), photos, dialog_id, replyingMessageObject, getThreadMessage(), null, forceDocument, true, null, notify, scheduleDate, photos.get(0).updateStickersOrder);
|
||||
afterMessageSend();
|
||||
chatActivityEnterView.setFieldText("");
|
||||
}
|
||||
|
|
|
@ -246,7 +246,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
|
||||
boolean updating;
|
||||
Runnable updateListRunnable = () -> {
|
||||
dialogsAdapter.updateList(listView);
|
||||
dialogsAdapter.updateList(listView, dialogsType == 0 && hasHiddenArchive());
|
||||
listView.updateDialogsOnNextDraw = true;
|
||||
updating = false;
|
||||
};
|
||||
|
@ -1664,7 +1664,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
if (parentPage.dialogsType == 0 && hasHiddenArchive()) {
|
||||
ignoreLayout = true;
|
||||
LinearLayoutManager layoutManager = (LinearLayoutManager) getLayoutManager();
|
||||
layoutManager.scrollToPositionWithOffset(1, (int) actionBar.getTranslationY());
|
||||
layoutManager.scrollToPositionWithOffset(1, 0);
|
||||
ignoreLayout = false;
|
||||
}
|
||||
firstLayout = false;
|
||||
|
@ -1905,9 +1905,6 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
DialogsAdapter adapter = (DialogsAdapter) getAdapter();
|
||||
int p = adapter.findDialogPosition(anchorView.getDialogId());
|
||||
int offset = (int) (anchorView.getTop() - getPaddingTop());
|
||||
// if (!opened && offset > (getMeasuredHeight() - getPaddingTop()) / 2) {
|
||||
// offset -= AndroidUtilities.dp(44);
|
||||
// }
|
||||
if (p >= 0) {
|
||||
((LinearLayoutManager) getLayoutManager()).scrollToPositionWithOffset(p, offset);
|
||||
}
|
||||
|
@ -1929,7 +1926,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
|
||||
@Override
|
||||
public int getMovementFlags(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder) {
|
||||
if (waitingForDialogsAnimationEnd(parentPage) || parentLayout != null && parentLayout.isInPreviewMode()) {
|
||||
if (waitingForDialogsAnimationEnd(parentPage) || parentLayout != null && parentLayout.isInPreviewMode() || rightSlidingDialogContainer.hasFragment()) {
|
||||
return 0;
|
||||
}
|
||||
if (swipingFolder && swipeFolderBack) {
|
||||
|
@ -4436,6 +4433,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
transitionPage.listView.setClipChildren(false);
|
||||
actionBar.setAllowOverlayTitle(false);
|
||||
transitionPage.listView.stopScroll();
|
||||
updateDrawerSwipeEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -4459,6 +4457,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
transitionPage.layoutManager.setNeedFixEndGap(!hasFragment());
|
||||
DialogsActivity.this.setScrollY(0);
|
||||
searchViewPager.updateTabs();
|
||||
updateDrawerSwipeEnabled();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -6250,7 +6249,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
if (!validateSlowModeDialog(dialogId)) {
|
||||
return;
|
||||
}
|
||||
if (!selectedDialogs.isEmpty() || (initialDialogsType == 3 && selectAlertString != null)) {
|
||||
if (!getMessagesController().isForum(dialogId) && (!selectedDialogs.isEmpty() || (initialDialogsType == 3 && selectAlertString != null))) {
|
||||
if (!selectedDialogs.contains(dialogId) && !checkCanWrite(dialogId)) {
|
||||
return;
|
||||
}
|
||||
|
@ -9161,19 +9160,27 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
if (chat == null) {
|
||||
return;
|
||||
}
|
||||
CharSequence chatTitle = chat.title;
|
||||
if (topicId != 0) {
|
||||
TLRPC.TL_forumTopic topic = getMessagesController().getTopicsController().findTopic(chat.id, topicId);
|
||||
if (topic != null) {
|
||||
chatTitle += " " + topic.title;
|
||||
}
|
||||
}
|
||||
|
||||
if (addToGroupAlertString != null) {
|
||||
title = LocaleController.getString("AddToTheGroupAlertTitle", R.string.AddToTheGroupAlertTitle);
|
||||
message = LocaleController.formatStringSimple(addToGroupAlertString, chat.title);
|
||||
message = LocaleController.formatStringSimple(addToGroupAlertString, chatTitle);
|
||||
buttonText = LocaleController.getString("Add", R.string.Add);
|
||||
} else {
|
||||
title = LocaleController.getString("SendMessageTitle", R.string.SendMessageTitle);
|
||||
message = LocaleController.formatStringSimple(selectAlertStringGroup, chat.title);
|
||||
message = LocaleController.formatStringSimple(selectAlertStringGroup, chatTitle);
|
||||
buttonText = LocaleController.getString("Send", R.string.Send);
|
||||
}
|
||||
}
|
||||
builder.setTitle(title);
|
||||
builder.setMessage(AndroidUtilities.replaceTags(message));
|
||||
builder.setPositiveButton(buttonText, (dialogInterface, i) -> didSelectResult(dialogId, 0,false, false));
|
||||
builder.setPositiveButton(buttonText, (dialogInterface, i) -> didSelectResult(dialogId, topicId,false, false));
|
||||
builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
|
||||
showDialog(builder.create());
|
||||
} else {
|
||||
|
@ -9877,17 +9884,17 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
}
|
||||
if (sliding) {
|
||||
if (viewPages != null && viewPages[0] != null) {
|
||||
viewPages[0].setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
// viewPages[0].setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
viewPages[0].setClipChildren(false);
|
||||
viewPages[0].setClipToPadding(false);
|
||||
viewPages[0].listView.setClipChildren(false);
|
||||
}
|
||||
|
||||
if (actionBar != null) {
|
||||
actionBar.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
// actionBar.setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
}
|
||||
if (filterTabsView != null) {
|
||||
filterTabsView.getListView().setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
// filterTabsView.getListView().setLayerType(View.LAYER_TYPE_HARDWARE, null);
|
||||
}
|
||||
if (fragmentView != null) {
|
||||
((ViewGroup) fragmentView).setClipChildren(false);
|
||||
|
|
|
@ -4851,6 +4851,7 @@ public class LaunchActivity extends BasePermissionsActivity implements INavigati
|
|||
final ChatActivity fragment;
|
||||
if (dids.size() <= 1) {
|
||||
final long did = dids.get(0).dialogId;
|
||||
final int topicId = dids.get(0).topicId;
|
||||
|
||||
Bundle args = new Bundle();
|
||||
args.putBoolean("scrollToTopOnResume", true);
|
||||
|
@ -4868,6 +4869,7 @@ public class LaunchActivity extends BasePermissionsActivity implements INavigati
|
|||
return;
|
||||
}
|
||||
fragment = new ChatActivity(args);
|
||||
ForumUtilities.applyTopic(fragment, dids.get(0));
|
||||
} else {
|
||||
fragment = null;
|
||||
}
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
#Sat Mar 12 05:53:50 MSK 2016
|
||||
APP_VERSION_NAME=9.2.1
|
||||
APP_VERSION_CODE=2962
|
||||
APP_VERSION_NAME=9.2.2
|
||||
APP_VERSION_CODE=2965
|
||||
APP_PACKAGE=org.telegram.messenger
|
||||
RELEASE_KEY_PASSWORD=TelegramAndroidPswd
|
||||
RELEASE_KEY_ALIAS=tmessages
|
||||
|
|
Loading…
Reference in a new issue