Update to 6.1.0 (1940)

This commit is contained in:
DrKLO 2020-04-24 12:28:11 +03:00
parent ae0d24ebf2
commit ed9e38da5b
8 changed files with 27 additions and 16 deletions

View File

@ -286,7 +286,7 @@ android {
}
}
defaultConfig.versionCode = 1938
defaultConfig.versionCode = 1940
def tgVoipDexFileName = "libtgvoip.dex"
def tgVoipDexClasses = ["AudioRecordJNI", "AudioTrackJNI", "NativeTgVoipDelegate", "NativeTgVoipInstance", "TgVoipNativeLoader", "Resampler", "VLog"]

View File

@ -2894,6 +2894,15 @@ public class AndroidUtilities {
return null;
}
public static void fixGoogleMapsBug() { //https://issuetracker.google.com/issues/154855417#comment301
SharedPreferences googleBug = ApplicationLoader.applicationContext.getSharedPreferences("google_bug_154855417", Context.MODE_PRIVATE);
if (!googleBug.contains("fixed")) {
File corruptedZoomTables = new File(ApplicationLoader.getFilesDirFixed(), "ZoomTables.data");
corruptedZoomTables.delete();
googleBug.edit().putBoolean("fixed", true).apply();
}
}
public static CharSequence concat(CharSequence... text) {
if (text.length == 0) {
return "";

View File

@ -19,7 +19,7 @@ public class BuildVars {
public static boolean USE_CLOUD_STRINGS = true;
public static boolean CHECK_UPDATES = true;
public static boolean TON_WALLET_STANDALONE = false;
public static int BUILD_VERSION = 1938;
public static int BUILD_VERSION = 1940;
public static String BUILD_VERSION_STRING = "6.1.0";
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";

View File

@ -396,6 +396,7 @@ public class CacheControlActivity extends BaseFragment {
return false;
}
};
bottomSheet.setAllowNestedScroll(true);
bottomSheet.setApplyBottomPadding(false);
LinearLayout linearLayout = new LinearLayout(getParentActivity());
bottomSheetView = linearLayout;
@ -488,15 +489,7 @@ public class CacheControlActivity extends BaseFragment {
cleanupFolders();
});
linearLayout.addView(cell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 50));
NestedScrollView scrollView = new NestedScrollView(context) {
@Override
public boolean onTouchEvent(MotionEvent ev) {
if (getMeasuredHeight() == linearLayout.getMeasuredHeight()) {
return false;
}
return super.onTouchEvent(ev);
}
};
NestedScrollView scrollView = new NestedScrollView(context);
scrollView.setVerticalScrollBarEnabled(false);
scrollView.addView(linearLayout);
bottomSheet.setCustomView(scrollView);

View File

@ -15732,6 +15732,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
progressDialog[0] = null;
if (response instanceof TLRPC.TL_payments_bankCardData) {
if (getParentActivity() == null) {
return;
}
TLRPC.TL_payments_bankCardData data = (TLRPC.TL_payments_bankCardData) response;
BottomSheet.Builder builder = new BottomSheet.Builder(getParentActivity());
ArrayList<CharSequence> arrayList = new ArrayList<>();

View File

@ -370,6 +370,7 @@ public class ChatAttachAlertLocationLayout extends ChatAttachAlert.AttachAlertLa
public ChatAttachAlertLocationLayout(ChatAttachAlert alert, Context context) {
super(alert, context);
AndroidUtilities.fixGoogleMapsBug();
ChatActivity chatActivity = (ChatActivity) parentAlert.baseFragment;
dialogId = chatActivity.getDialogId();
if (chatActivity.getCurrentEncryptedChat() == null && !chatActivity.isInScheduleMode() && !UserObject.isUserSelf(chatActivity.getCurrentUser())) {

View File

@ -400,6 +400,7 @@ public class LocationActivity extends BaseFragment implements NotificationCenter
public LocationActivity(int type) {
super();
locationType = type;
AndroidUtilities.fixGoogleMapsBug();
}
@Override

View File

@ -1453,7 +1453,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
int height = MeasureSpec.getSize(heightMeasureSpec);
boolean changed = false;
if (lastMeasuredContentWidth != getMeasuredWidth() || lastMeasuredContentHeight != getMeasuredHeight()) {
changed = lastMeasuredContentWidth != 0;
changed = lastMeasuredContentWidth != 0 && lastMeasuredContentWidth != getMeasuredWidth();
listContentHeight = 0;
int count = listAdapter.getItemCount();
lastMeasuredContentWidth = getMeasuredWidth();
@ -1462,12 +1462,13 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
int hs = MeasureSpec.makeMeasureSpec(listView.getMeasuredHeight(), MeasureSpec.UNSPECIFIED);
positionToOffset.clear();
for (int i = 0; i < count; i++) {
RecyclerView.ViewHolder holder = listAdapter.createViewHolder(null, listAdapter.getItemViewType(i));
listAdapter.onBindViewHolder(holder, i);
int type = listAdapter.getItemViewType(i);
positionToOffset.put(i, listContentHeight);
if (holder.itemView instanceof SharedMediaLayout) {
if (type == 13) {
listContentHeight += listView.getMeasuredHeight();
} else {
RecyclerView.ViewHolder holder = listAdapter.createViewHolder(null, type);
listAdapter.onBindViewHolder(holder, i);
holder.itemView.measure(ws, hs);
listContentHeight += holder.itemView.getMeasuredHeight();
}
@ -1548,7 +1549,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
top = view.getTop();
}
boolean layout = false;
if (!changed && pos != RecyclerView.NO_POSITION) {
if (actionBar.isSearchFieldVisible()) {
layoutManager.scrollToPositionWithOffset(sharedMediaRow, -paddingTop);
layout = true;
} else if (!changed && pos != RecyclerView.NO_POSITION) {
layoutManager.scrollToPositionWithOffset(pos, top - paddingTop);
layout = true;
}