From 0b6e9dc6b2e399060827ed532781a16d22079307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Sun, 15 Nov 2020 14:13:57 +0000 Subject: [PATCH] Minor fixes --- TMessagesProj/build.gradle | 10 +++---- TMessagesProj/proguard-rules.pro | 2 +- .../org/telegram/ui/CacheControlActivity.java | 7 ++--- .../ui/Components/ChatActivityEnterView.java | 30 ++----------------- .../src/main/res/values/strings_neko.xml | 13 ++++---- build.gradle | 2 +- 6 files changed, 18 insertions(+), 46 deletions(-) diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 00dd6be9a..59a4e042e 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -2,8 +2,8 @@ apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' -def verName = "7.2.1-rc06" -def verCode = 113 +def verName = "7.2.1-rc07" +def verCode = 114 def serviceAccountCredentialsFile = rootProject.file("service_account_credentials.json") @@ -40,7 +40,7 @@ configurations { def okHttpVersion = '4.9.0' def fcmVersion = '21.0.0' -def crashlyticsVersion = '17.2.2' +def crashlyticsVersion = '17.3.0' def playCoreVersion = '1.8.3' repositories { @@ -52,7 +52,7 @@ repositories { dependencies { - implementation 'androidx.core:core-ktx:1.5.0-alpha04' + implementation 'androidx.core:core-ktx:1.5.0-alpha05' implementation 'androidx.palette:palette-ktx:1.0.0' implementation 'androidx.viewpager:viewpager:1.0.0' implementation 'androidx.exifinterface:exifinterface:1.3.1' @@ -97,7 +97,7 @@ dependencies { releaseImplementation "com.google.firebase:firebase-crashlytics:$crashlyticsVersion" releaseImplementation "com.google.android.play:core:$playCoreVersion" - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.0' + coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.1' } diff --git a/TMessagesProj/proguard-rules.pro b/TMessagesProj/proguard-rules.pro index 194e51fa3..58c449209 100644 --- a/TMessagesProj/proguard-rules.pro +++ b/TMessagesProj/proguard-rules.pro @@ -132,7 +132,7 @@ -dontwarn javax.annotation.** # Use -keep to explicitly keep any other classes shrinking would remove -# -dontoptimize +-dontobfuscate # https://github.com/osmdroid/osmdroid/issues/633 -dontwarn org.osmdroid.tileprovider.modules.NetworkAvailabliltyCheck diff --git a/TMessagesProj/src/main/java/org/telegram/ui/CacheControlActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/CacheControlActivity.java index 82270b3e1..728a85d3b 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/CacheControlActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/CacheControlActivity.java @@ -9,7 +9,6 @@ package org.telegram.ui; import android.content.Context; -import android.content.DialogInterface; import android.content.SharedPreferences; import android.os.Build; import android.os.Environment; @@ -19,12 +18,10 @@ import android.transition.Fade; import android.transition.TransitionManager; import android.transition.TransitionSet; import android.view.Gravity; -import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; import android.widget.LinearLayout; -import android.widget.TextView; import androidx.core.widget.NestedScrollView; import androidx.recyclerview.widget.LinearLayoutManager; @@ -551,6 +548,8 @@ public class CacheControlActivity extends BaseFragment { progressDialog.showDelayed(500); MessagesStorage.getInstance(currentAccount).getStorageQueue().postRunnable(() -> { try { + TranslateDb.clearAll(); + SQLiteDatabase database = MessagesStorage.getInstance(currentAccount).getDatabase(); ArrayList dialogsToCleanup = new ArrayList<>(); @@ -626,8 +625,6 @@ public class CacheControlActivity extends BaseFragment { database.executeFast("VACUUM").stepThis().dispose(); database.executeFast("PRAGMA journal_size_limit = -1").stepThis().dispose(); - TranslateDb.clearAll(); - } catch (Exception e) { FileLog.e(e); } finally { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java index 973e4632e..405eda0ba 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/ChatActivityEnterView.java @@ -3101,34 +3101,16 @@ public class ChatActivityEnterView extends FrameLayout implements NotificationCe return false; } - private ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayoutDefault; - private ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayoutInput; - private ActionBarPopupWindow menuPopupWindowDefault; - private ActionBarPopupWindow menuPopupWindowInput; - private ActionBarPopupWindow menuPopupWindow; private boolean isInInput; + private ActionBarPopupWindow menuPopupWindow; private void onMenuClick(View view) { if (parentFragment == null) { return; } - ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayout; + ActionBarPopupWindow.ActionBarPopupWindowLayout menuPopupLayout = new ActionBarPopupWindow.ActionBarPopupWindowLayout(parentActivity); - 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() { @@ -3304,16 +3286,10 @@ 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(); } - } + menuPopupLayout.measure(MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(1000), MeasureSpec.AT_MOST), MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(1000), MeasureSpec.AT_MOST)); menuPopupWindow.setFocusable(true); diff --git a/TMessagesProj/src/main/res/values/strings_neko.xml b/TMessagesProj/src/main/res/values/strings_neko.xml index 27efc546a..27c77f304 100644 --- a/TMessagesProj/src/main/res/values/strings_neko.xml +++ b/TMessagesProj/src/main/res/values/strings_neko.xml @@ -45,7 +45,8 @@ Hide proxy sponsor channel View history Meow! - Save cache to private directory + Storage isolation + Save \"Telegram\" folder to app-specific directory to keep shared storage tidy. Disable sensitive content filtering Display sensitive media in public channels on all your devices. Sticker size @@ -59,8 +60,6 @@ Details Export as JSON Translate - joined %1$s - joined on %1$s Delete Telegram account Translate server error Translation provider @@ -92,7 +91,6 @@ Ask before calling Confirm calling Call to **%1$s**? - Set as current Disable number rounding Categories Official channel @@ -100,8 +98,6 @@ You\'ll no longer see messages from blocked users in groups. Donate Support our development. - Help us to translate Nekogram to your language. - Translate Nekogram Google Play Source code on Github Reset sticker size @@ -110,4 +106,7 @@ This is a **beta** feature implemented by **Telegram**. Media preview in dialog list Yandex Translate - + Auto pause video + When lock screen/switch to background. + Disable proximity events + \ No newline at end of file diff --git a/build.gradle b/build.gradle index fff6da2c4..3f3b6c815 100644 --- a/build.gradle +++ b/build.gradle @@ -7,7 +7,7 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' + classpath 'com.android.tools.build:gradle:4.1.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10" classpath 'com.google.gms:google-services:4.3.4' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'