diff --git a/Dockerfile b/Dockerfile index 5a5658e8e..07acce3e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,4 +27,4 @@ RUN cp $ANDROID_HOME/build-tools/30.0.3/lib/dx.jar $ANDROID_HOME/build-tools/31. ENV PATH ${ANDROID_NDK_HOME}:$PATH ENV PATH ${ANDROID_NDK_HOME}/prebuilt/linux-x86_64/bin/:$PATH -CMD mkdir -p /home/source/TMessagesProj/build/outputs/apk && mkdir -p /home/source/TMessagesProj/build/outputs/native-debug-symbols && cp -R /home/source/. /home/gradle && cd /home/gradle && gradle assembleRelease && gradle assembleStandalone && cp -R /home/gradle/TMessagesProj/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && cp -R /home/gradle/TMessagesProj/build/outputs/native-debug-symbols/. /home/source/TMessagesProj/build/outputs/native-debug-symbols +CMD mkdir -p /home/source/TMessagesProj/build/outputs/apk && mkdir -p /home/source/TMessagesProj/build/outputs/native-debug-symbols && cp -R /home/source/. /home/gradle && cd /home/gradle && gradle bundleBundleAfat_SDK23Release && gradle bundleBundleAfatRelease && gradle assembleStandalone && gradle assembleAfatRelease && cp -R /home/gradle/TMessagesProj/build/outputs/apk/. /home/source/TMessagesProj/build/outputs/apk && cp -R /home/gradle/TMessagesProj/build/outputs/bundle/. /home/source/TMessagesProj/build/outputs/bundle && cp -R /home/gradle/TMessagesProj/build/outputs/native-debug-symbols/. /home/source/TMessagesProj/build/outputs/native-debug-symbols diff --git a/TMessagesProj/build.gradle b/TMessagesProj/build.gradle index 58c875638..a89f35766 100644 --- a/TMessagesProj/build.gradle +++ b/TMessagesProj/build.gradle @@ -40,8 +40,6 @@ dependencies { implementation 'com.android.billingclient:billing:5.0.0' implementation files('libs/libgsaverification-client.aar') - implementation "com.android.billingclient:billing:5.0.0" - coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' } @@ -237,7 +235,7 @@ android { } } - defaultConfig.versionCode = 2702 + defaultConfig.versionCode = 2705 applicationVariants.all { variant -> variant.outputs.all { output -> @@ -256,7 +254,7 @@ android { defaultConfig { minSdkVersion 16 targetSdkVersion 30 - versionName "8.8.2" + versionName "8.8.3" vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi'] diff --git a/TMessagesProj/src/main/assets/currencies.json b/TMessagesProj/src/main/assets/currencies.json new file mode 100644 index 000000000..732c551bf --- /dev/null +++ b/TMessagesProj/src/main/assets/currencies.json @@ -0,0 +1 @@ +{"AED":{"code":"AED","title":"United Arab Emirates Dirham","symbol":"AED","native":"د.إ.‏","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"367","max_amount":"3673104"},"AFN":{"code":"AFN","title":"Afghan Afghani","symbol":"AFN","native":"؋","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"8943","max_amount":"89437089"},"ALL":{"code":"ALL","title":"Albanian Lek","symbol":"ALL","native":"Lek","thousands_sep":".","decimal_sep":",","symbol_left":false,"space_between":false,"exp":2,"min_amount":"11415","max_amount":"114153729"},"AMD":{"code":"AMD","title":"Armenian Dram","symbol":"AMD","native":"դր.","thousands_sep":",","decimal_sep":".","symbol_left":false,"space_between":true,"exp":2,"min_amount":"42405","max_amount":"424059434"},"ARS":{"code":"ARS","title":"Argentine Peso","symbol":"ARS","native":"$","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":true,"exp":2,"min_amount":"12287","max_amount":"122871702"},"AUD":{"code":"AUD","title":"Australian Dollar","symbol":"AU$","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"144","max_amount":"1442793"},"AZN":{"code":"AZN","title":"Azerbaijani Manat","symbol":"AZN","native":"ман.","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"170","max_amount":"1703970"},"BAM":{"code":"BAM","title":"Bosnia & Herzegovina Convertible Mark","symbol":"BAM","native":"KM","thousands_sep":".","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"186","max_amount":"1862873"},"BDT":{"code":"BDT","title":"Bangladeshi Taka","symbol":"BDT","native":"৳","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"9313","max_amount":"93138585"},"BGN":{"code":"BGN","title":"Bulgarian Lev","symbol":"BGN","native":"лв.","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"186","max_amount":"1862844"},"BND":{"code":"BND","title":"Brunei Dollar","symbol":"BND","native":"$","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":false,"exp":2,"min_amount":"138","max_amount":"1388608"},"BOB":{"code":"BOB","title":"Bolivian Boliviano","symbol":"BOB","native":"Bs","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":true,"exp":2,"min_amount":"689","max_amount":"6898943"},"BRL":{"code":"BRL","title":"Brazilian Real","symbol":"R$","native":"R$","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":true,"exp":2,"min_amount":"515","max_amount":"5153919"},"CAD":{"code":"CAD","title":"Canadian Dollar","symbol":"CA$","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"130","max_amount":"1303495"},"CHF":{"code":"CHF","title":"Swiss Franc","symbol":"CHF","native":"CHF","thousands_sep":"'","decimal_sep":".","symbol_left":false,"space_between":true,"exp":2,"min_amount":"97","max_amount":"970848"},"CLP":{"code":"CLP","title":"Chilean Peso","symbol":"CLP","native":"$","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":true,"exp":0,"min_amount":"876","max_amount":"8768039"},"CNY":{"code":"CNY","title":"Chinese Renminbi Yuan","symbol":"CN¥","native":"CN¥","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"671","max_amount":"6716704"},"COP":{"code":"COP","title":"Colombian Peso","symbol":"COP","native":"$","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":true,"exp":2,"min_amount":"390589","max_amount":"3905895800"},"CRC":{"code":"CRC","title":"Costa Rican Colón","symbol":"CRC","native":"₡","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":false,"exp":2,"min_amount":"68499","max_amount":"684998571"},"CZK":{"code":"CZK","title":"Czech Koruna","symbol":"CZK","native":"Kč","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"2355","max_amount":"23555404"},"DKK":{"code":"DKK","title":"Danish Krone","symbol":"DKK","native":"kr","thousands_sep":"","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"708","max_amount":"7087040"},"DOP":{"code":"DOP","title":"Dominican Peso","symbol":"DOP","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"5485","max_amount":"54850938"},"DZD":{"code":"DZD","title":"Algerian Dinar","symbol":"DZD","native":"د.ج.‏","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"14626","max_amount":"146263454"},"EGP":{"code":"EGP","title":"Egyptian Pound","symbol":"EGP","native":"ج.م.‏","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"1874","max_amount":"18741785"},"EUR":{"code":"EUR","title":"Euro","symbol":"€","native":"€","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"95","max_amount":"952804"},"GBP":{"code":"GBP","title":"British Pound","symbol":"£","native":"£","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"81","max_amount":"817962"},"GEL":{"code":"GEL","title":"Georgian Lari","symbol":"GEL","native":"GEL","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"292","max_amount":"2925040"},"GTQ":{"code":"GTQ","title":"Guatemalan Quetzal","symbol":"GTQ","native":"Q","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"775","max_amount":"7750738"},"HKD":{"code":"HKD","title":"Hong Kong Dollar","symbol":"HK$","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"785","max_amount":"7850055"},"HNL":{"code":"HNL","title":"Honduran Lempira","symbol":"HNL","native":"L","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"2461","max_amount":"24617583"},"HRK":{"code":"HRK","title":"Croatian Kuna","symbol":"HRK","native":"kn","thousands_sep":".","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"716","max_amount":"7164904"},"HUF":{"code":"HUF","title":"Hungarian Forint","symbol":"HUF","native":"Ft","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"38098","max_amount":"380982504"},"IDR":{"code":"IDR","title":"Indonesian Rupiah","symbol":"IDR","native":"Rp","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":false,"exp":2,"min_amount":"1483885","max_amount":"14838850000"},"ILS":{"code":"ILS","title":"Israeli New Sheqel","symbol":"₪","native":"₪","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"346","max_amount":"3462015"},"INR":{"code":"INR","title":"Indian Rupee","symbol":"₹","native":"₹","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"7795","max_amount":"77951504"},"ISK":{"code":"ISK","title":"Icelandic Króna","symbol":"ISK","native":"kr","thousands_sep":".","decimal_sep":",","symbol_left":false,"space_between":true,"exp":0,"min_amount":"131","max_amount":"1311903"},"JMD":{"code":"JMD","title":"Jamaican Dollar","symbol":"JMD","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"15254","max_amount":"152544052"},"JPY":{"code":"JPY","title":"Japanese Yen","symbol":"¥","native":"¥","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":0,"min_amount":"134","max_amount":"1349925"},"KES":{"code":"KES","title":"Kenyan Shilling","symbol":"KES","native":"Ksh","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"11763","max_amount":"117638156"},"KGS":{"code":"KGS","title":"Kyrgyzstani Som","symbol":"KGS","native":"KGS","thousands_sep":" ","decimal_sep":"-","symbol_left":false,"space_between":true,"exp":2,"min_amount":"7950","max_amount":"79501104"},"KRW":{"code":"KRW","title":"South Korean Won","symbol":"₩","native":"₩","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":0,"min_amount":"1291","max_amount":"12915037"},"KZT":{"code":"KZT","title":"Kazakhstani Tenge","symbol":"KZT","native":"₸","thousands_sep":" ","decimal_sep":"-","symbol_left":true,"space_between":false,"exp":2,"min_amount":"44915","max_amount":"449157063"},"LBP":{"code":"LBP","title":"Lebanese Pound","symbol":"LBP","native":"ل.ل.‏","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"151528","max_amount":"1515287170"},"LKR":{"code":"LKR","title":"Sri Lankan Rupee","symbol":"LKR","native":"රු.","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"35972","max_amount":"359728355"},"MAD":{"code":"MAD","title":"Moroccan Dirham","symbol":"MAD","native":"د.م.‏","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"1009","max_amount":"10093437"},"MDL":{"code":"MDL","title":"Moldovan Leu","symbol":"MDL","native":"MDL","thousands_sep":",","decimal_sep":".","symbol_left":false,"space_between":true,"exp":2,"min_amount":"1928","max_amount":"19284027"},"MNT":{"code":"MNT","title":"Mongolian Tögrög","symbol":"MNT","native":"MNT","thousands_sep":" ","decimal_sep":",","symbol_left":true,"space_between":false,"exp":2,"min_amount":"311718","max_amount":"3117185198"},"MUR":{"code":"MUR","title":"Mauritian Rupee","symbol":"MUR","native":"MUR","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"4495","max_amount":"44956663"},"MVR":{"code":"MVR","title":"Maldivian Rufiyaa","symbol":"MVR","native":"MVR","thousands_sep":",","decimal_sep":".","symbol_left":false,"space_between":true,"exp":2,"min_amount":"1540","max_amount":"15403741"},"MXN":{"code":"MXN","title":"Mexican Peso","symbol":"MX$","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"2033","max_amount":"20338950"},"MYR":{"code":"MYR","title":"Malaysian Ringgit","symbol":"MYR","native":"RM","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"440","max_amount":"4402039"},"MZN":{"code":"MZN","title":"Mozambican Metical","symbol":"MZN","native":"MTn","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"6383","max_amount":"63830377"},"NGN":{"code":"NGN","title":"Nigerian Naira","symbol":"NGN","native":"₦","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"41537","max_amount":"415370377"},"NIO":{"code":"NIO","title":"Nicaraguan Córdoba","symbol":"NIO","native":"C$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"3592","max_amount":"35928184"},"NOK":{"code":"NOK","title":"Norwegian Krone","symbol":"NOK","native":"kr","thousands_sep":" ","decimal_sep":",","symbol_left":true,"space_between":true,"exp":2,"min_amount":"1001","max_amount":"10013205"},"NPR":{"code":"NPR","title":"Nepalese Rupee","symbol":"NPR","native":"नेरू","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"12511","max_amount":"125113820"},"NZD":{"code":"NZD","title":"New Zealand Dollar","symbol":"NZ$","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"158","max_amount":"1585666"},"PAB":{"code":"PAB","title":"Panamanian Balboa","symbol":"PAB","native":"B\/.","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"100","max_amount":"1002000"},"PEN":{"code":"PEN","title":"Peruvian Nuevo Sol","symbol":"PEN","native":"S\/.","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"371","max_amount":"3718830"},"PHP":{"code":"PHP","title":"Philippine Peso","symbol":"PHP","native":"₱","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"5376","max_amount":"53760375"},"PKR":{"code":"PKR","title":"Pakistani Rupee","symbol":"PKR","native":"₨","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"20967","max_amount":"209674540"},"PLN":{"code":"PLN","title":"Polish Złoty","symbol":"PLN","native":"zł","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"445","max_amount":"4457704"},"PYG":{"code":"PYG","title":"Paraguayan Guaraní","symbol":"PYG","native":"₲","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":true,"exp":0,"min_amount":"6873","max_amount":"68730355"},"QAR":{"code":"QAR","title":"Qatari Riyal","symbol":"QAR","native":"ر.ق.‏","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"364","max_amount":"3641038"},"RON":{"code":"RON","title":"Romanian Leu","symbol":"RON","native":"RON","thousands_sep":".","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"471","max_amount":"4711804"},"RSD":{"code":"RSD","title":"Serbian Dinar","symbol":"RSD","native":"дин.","thousands_sep":".","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"11195","max_amount":"111950662"},"RUB":{"code":"RUB","title":"Russian Ruble","symbol":"RUB","native":"руб.","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"5749","max_amount":"57499904"},"SAR":{"code":"SAR","title":"Saudi Riyal","symbol":"SAR","native":"ر.س.‏","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"375","max_amount":"3751352"},"SEK":{"code":"SEK","title":"Swedish Krona","symbol":"SEK","native":"kr","thousands_sep":".","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"1022","max_amount":"10229465"},"SGD":{"code":"SGD","title":"Singapore Dollar","symbol":"SGD","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"139","max_amount":"1390604"},"THB":{"code":"THB","title":"Thai Baht","symbol":"฿","native":"฿","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"3523","max_amount":"35232038"},"TJS":{"code":"TJS","title":"Tajikistani Somoni","symbol":"TJS","native":"TJS","thousands_sep":" ","decimal_sep":";","symbol_left":false,"space_between":true,"exp":2,"min_amount":"1106","max_amount":"11060101"},"TRY":{"code":"TRY","title":"Turkish Lira","symbol":"TRY","native":"TL","thousands_sep":".","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"1732","max_amount":"17328404"},"TTD":{"code":"TTD","title":"Trinidad and Tobago Dollar","symbol":"TTD","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"680","max_amount":"6808077"},"TWD":{"code":"TWD","title":"New Taiwan Dollar","symbol":"NT$","native":"NT$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"2971","max_amount":"29716504"},"TZS":{"code":"TZS","title":"Tanzanian Shilling","symbol":"TZS","native":"TSh","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"233672","max_amount":"2336727307"},"UAH":{"code":"UAH","title":"Ukrainian Hryvnia","symbol":"UAH","native":"₴","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":false,"exp":2,"min_amount":"2960","max_amount":"29603677"},"UGX":{"code":"UGX","title":"Ugandan Shilling","symbol":"UGX","native":"USh","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":0,"min_amount":"3747","max_amount":"37475950"},"USD":{"code":"USD","title":"United States Dollar","symbol":"$","native":"$","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":false,"exp":2,"min_amount":"100","max_amount":1000000},"UYU":{"code":"UYU","title":"Uruguayan Peso","symbol":"UYU","native":"$","thousands_sep":".","decimal_sep":",","symbol_left":true,"space_between":true,"exp":2,"min_amount":"4018","max_amount":"40180970"},"UZS":{"code":"UZS","title":"Uzbekistani Som","symbol":"UZS","native":"UZS","thousands_sep":" ","decimal_sep":",","symbol_left":false,"space_between":true,"exp":2,"min_amount":"1099173","max_amount":"10991732546"},"VND":{"code":"VND","title":"Vietnamese Đồng","symbol":"₫","native":"₫","thousands_sep":".","decimal_sep":",","symbol_left":false,"space_between":true,"exp":0,"min_amount":"23230","max_amount":"232300000"},"YER":{"code":"YER","title":"Yemeni Rial","symbol":"YER","native":"ر.ي.‏","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"25025","max_amount":"250250364"},"ZAR":{"code":"ZAR","title":"South African Rand","symbol":"ZAR","native":"R","thousands_sep":",","decimal_sep":".","symbol_left":true,"space_between":true,"exp":2,"min_amount":"1602","max_amount":"16028160"}} \ No newline at end of file diff --git a/TMessagesProj/src/main/java/androidx/recyclerview/widget/GapWorker.java b/TMessagesProj/src/main/java/androidx/recyclerview/widget/GapWorker.java index 0ac777d20..c89753e40 100644 --- a/TMessagesProj/src/main/java/androidx/recyclerview/widget/GapWorker.java +++ b/TMessagesProj/src/main/java/androidx/recyclerview/widget/GapWorker.java @@ -21,6 +21,9 @@ import android.view.View; import androidx.annotation.Nullable; import androidx.core.os.TraceCompat; +import org.telegram.messenger.AndroidUtilities; +import org.telegram.messenger.FileLog; + import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; @@ -274,6 +277,7 @@ final class GapWorker implements Runnable { return false; } + @SuppressLint("NotifyDataSetChanged") private RecyclerView.ViewHolder prefetchPositionWithDeadline(RecyclerView view, int position, long deadlineNs) { if (isPrefetchPositionAttached(view, position)) { @@ -301,6 +305,14 @@ final class GapWorker implements Runnable { recycler.addViewHolderToRecycledViewPool(holder, false); } } + } catch (Exception e) { + FileLog.e(e); + AndroidUtilities.runOnUIThread(() -> { + if (view.getAdapter() != null) { + view.getAdapter().notifyDataSetChanged(); + } + }); + return null; } finally { view.onExitLayoutOrScroll(false); } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/BillingController.java b/TMessagesProj/src/main/java/org/telegram/messenger/BillingController.java index f66745807..5146f63ee 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/BillingController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/BillingController.java @@ -10,7 +10,6 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.core.util.Consumer; -import com.android.billingclient.api.AcknowledgePurchaseParams; import com.android.billingclient.api.BillingClient; import com.android.billingclient.api.BillingClientStateListener; import com.android.billingclient.api.BillingFlowParams; @@ -22,12 +21,16 @@ import com.android.billingclient.api.PurchasesResponseListener; import com.android.billingclient.api.PurchasesUpdatedListener; import com.android.billingclient.api.QueryProductDetailsParams; import com.android.billingclient.api.QueryPurchasesParams; +import com.google.android.exoplayer2.util.Util; +import org.json.JSONObject; import org.telegram.tgnet.TLRPC; +import java.io.InputStream; import java.util.ArrayList; import java.util.Collections; import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; @@ -46,6 +49,8 @@ public class BillingController implements PurchasesUpdatedListener, BillingClien private Map> resultListeners = new HashMap<>(); private List requestingTokens = new ArrayList<>(); + private Map currencyExpMap = new HashMap<>(); + public static BillingController getInstance() { if (instance == null) { instance = new BillingController(ApplicationLoader.applicationContext); @@ -62,11 +67,40 @@ public class BillingController implements PurchasesUpdatedListener, BillingClien .build(); } + public int getCurrencyExp(String currency) { + Integer exp = currencyExpMap.get(currency); + if (exp == null) { + return 0; + } + return exp; + } + public void startConnection() { if (isReady()) { return; } - billingClient.startConnection(this); + if (BuildVars.useInvoiceBilling()) { + try { + Context ctx = ApplicationLoader.applicationContext; + InputStream in = ctx.getAssets().open("currencies.json"); + JSONObject obj = new JSONObject(new String(Util.toByteArray(in), "UTF-8")); + parseCurrencies(obj); + in.close(); + } catch (Exception e) { + FileLog.e(e); + } + } else { + billingClient.startConnection(this); + } + } + + private void parseCurrencies(JSONObject obj) { + Iterator it = obj.keys(); + while (it.hasNext()) { + String key = it.next(); + JSONObject currency = obj.optJSONObject(key); + currencyExpMap.put(key, currency.optInt("exp")); + } } public boolean isReady() { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java index 0fe814f60..bbef146a7 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/BuildVars.java @@ -20,11 +20,11 @@ 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 = 2702; - public static String BUILD_VERSION_STRING = "8.8.2"; + public static int BUILD_VERSION = 2705; + public static String BUILD_VERSION_STRING = "8.8.3"; public static int APP_ID = 4; public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103"; - + public static String SMS_HASH = isStandaloneApp() ? "w0lkcmTZkKh" : (DEBUG_VERSION ? "O2P2z+/jBpJ" : "oLeq9AcOZkT"); public static String PLAYSTORE_APP_URL = "https://play.google.com/store/apps/details?id=org.telegram.messenger"; diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java b/TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java index 51fd986f7..d4615b184 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/FileLoader.java @@ -893,6 +893,9 @@ public class FileLoader extends BaseController { MessageObject messageObject = (MessageObject) parentObject; int flag; long dialogId = messageObject.getDialogId(); + if (messageObject.isAnyKindOfSticker() || getMessagesController().isChatNoForwards(getMessagesController().getChat(-dialogId)) || messageObject.messageOwner.noforwards) { + return false; + } if (dialogId >= 0) { flag = SharedConfig.SAVE_TO_GALLERY_FLAG_PEER; } else { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/FilePathDatabase.java b/TMessagesProj/src/main/java/org/telegram/messenger/FilePathDatabase.java index 5abf4fcf7..de5ae346a 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/FilePathDatabase.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/FilePathDatabase.java @@ -19,7 +19,6 @@ public class FilePathDatabase { private SQLiteDatabase database; private File cacheFile; - private File walCacheFile; private File shmCacheFile; private final static int LAST_DB_VERSION = 1; @@ -31,11 +30,11 @@ public class FilePathDatabase { this.currentAccount = currentAccount; dispatchQueue = new DispatchQueue("files_database_queue_" + currentAccount); dispatchQueue.postRunnable(() -> { - createDatabase(false); + createDatabase(0, false); }); } - public void createDatabase(boolean fromBackup) { + public void createDatabase(int tryCount, boolean fromBackup) { File filesDir = ApplicationLoader.getFilesDirFixed(); if (currentAccount != 0) { filesDir = new File(filesDir, "account" + currentAccount + "/"); @@ -47,6 +46,7 @@ public class FilePathDatabase { boolean createTable = false; + if (!cacheFile.exists()) { createTable = true; } @@ -59,6 +59,13 @@ public class FilePathDatabase { database.executeFast("CREATE TABLE paths(document_id INTEGER, dc_id INTEGER, type INTEGER, path TEXT, PRIMARY KEY(document_id, dc_id, type));").stepThis().dispose(); database.executeFast("PRAGMA user_version = " + LAST_DB_VERSION).stepThis().dispose(); } else { + int version = database.executeInt("PRAGMA user_version"); + if (BuildVars.LOGS_ENABLED) { + FileLog.d("current db version = " + version); + } + if (version == 0) { + throw new Exception("malformed"); + } //migration } if (!fromBackup) { @@ -66,12 +73,18 @@ public class FilePathDatabase { } FileLog.d("files db created from_backup= " + fromBackup); } catch (Exception e) { - if (!fromBackup && restoreBackup()) { - createDatabase(true); - return; + if (tryCount < 4) { + if (!fromBackup && restoreBackup()) { + createDatabase(tryCount + 1, true); + return; + } else { + cacheFile.delete(); + shmCacheFile.delete(); + createDatabase(tryCount + 1, false); + } } if (BuildVars.DEBUG_VERSION) { - throw new RuntimeException(e); + FileLog.e(e); } } } @@ -104,7 +117,7 @@ public class FilePathDatabase { try { return AndroidUtilities.copyFile(backupCacheFile, cacheFile); } catch (IOException e) { - e.printStackTrace(); + FileLog.e(e); } return false; } @@ -130,7 +143,7 @@ public class FilePathDatabase { } cursor.dispose(); } catch (SQLiteException e) { - throw new RuntimeException(e); + FileLog.e(e); } syncLatch.countDown(); }); @@ -149,9 +162,7 @@ public class FilePathDatabase { } cursor.dispose(); } catch (SQLiteException e) { - if (BuildVars.DEBUG_VERSION) { - throw new RuntimeException(e); - } + FileLog.e(e); } return res; } @@ -173,9 +184,7 @@ public class FilePathDatabase { database.executeFast("DELETE FROM paths WHERE document_id = " + id + " AND dc_id = " + dc + " AND type = " + type).stepThis().dispose(); } } catch (SQLiteException e) { - if (BuildVars.DEBUG_VERSION) { - throw new RuntimeException(e); - } + FileLog.e(e); } }); } @@ -203,7 +212,7 @@ public class FilePathDatabase { try { syncLatch.await(); } catch (InterruptedException e) { - throw new RuntimeException(e); + FileLog.e(e); } FileLog.d("checkMediaExistance size=" + messageObjects.size() + " time=" + (System.currentTimeMillis() - time)); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/ImageLoader.java b/TMessagesProj/src/main/java/org/telegram/messenger/ImageLoader.java index 90b8df939..3e8f2dca1 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/ImageLoader.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/ImageLoader.java @@ -997,7 +997,7 @@ public class ImageLoader { boolean needInvert = false; int orientation = 0; File cacheFileFinal = cacheImage.finalFilePath; - boolean inEncryptedFile = cacheImage.secureDocument != null || cacheImage.encryptionKeyPath != null && cacheFileFinal != null && cacheFileFinal.getAbsolutePath().endsWith(".enc"); + boolean inEncryptedFile = cacheImage.secureDocument != null || cacheImage.encryptionKeyPath != null && cacheFileFinal != null && (cacheFileFinal.getAbsolutePath().endsWith(".enc") || cacheFileFinal.getAbsolutePath().endsWith(".64enc")); SecureDocumentKey secureDocumentKey; byte[] secureDocumentHash; if (cacheImage.secureDocument != null) { diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java b/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java index 68e7c4599..854085961 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java @@ -226,6 +226,7 @@ public class MediaDataController extends BaseController { private long loadFeaturedHash; private int loadFeaturedDate; + public boolean loadFeaturedPremium; private ArrayList featuredStickerSets = new ArrayList<>(); private LongSparseArray featuredStickerSetsById = new LongSparseArray<>(); private ArrayList unreadStickerSets = new ArrayList<>(); @@ -1534,9 +1535,10 @@ public class MediaDataController extends BaseController { ArrayList unread = new ArrayList<>(); int date = 0; long hash = 0; + boolean premium = false; SQLiteCursor cursor = null; try { - cursor = getMessagesStorage().getDatabase().queryFinalized("SELECT data, unread, date, hash FROM stickers_featured WHERE 1"); + cursor = getMessagesStorage().getDatabase().queryFinalized("SELECT data, unread, date, hash, premium FROM stickers_featured WHERE 1"); if (cursor.next()) { NativeByteBuffer data = cursor.byteBufferValue(0); if (data != null) { @@ -1558,6 +1560,7 @@ public class MediaDataController extends BaseController { } date = cursor.intValue(2); hash = calcFeaturedStickersHash(newStickerArray); + premium = cursor.intValue(4) == 1; } } catch (Throwable e) { FileLog.e(e); @@ -1566,7 +1569,7 @@ public class MediaDataController extends BaseController { cursor.dispose(); } } - processLoadedFeaturedStickers(newStickerArray, unread, true, date, hash); + processLoadedFeaturedStickers(newStickerArray, unread, premium, true, date, hash); }); } else { TLRPC.TL_messages_getFeaturedStickers req = new TLRPC.TL_messages_getFeaturedStickers(); @@ -1574,15 +1577,15 @@ public class MediaDataController extends BaseController { getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> { if (response instanceof TLRPC.TL_messages_featuredStickers) { TLRPC.TL_messages_featuredStickers res = (TLRPC.TL_messages_featuredStickers) response; - processLoadedFeaturedStickers(res.sets, res.unread, false, (int) (System.currentTimeMillis() / 1000), res.hash); + processLoadedFeaturedStickers(res.sets, res.unread, res.premium,false, (int) (System.currentTimeMillis() / 1000), res.hash); } else { - processLoadedFeaturedStickers(null, null, false, (int) (System.currentTimeMillis() / 1000), req.hash); + processLoadedFeaturedStickers(null, null, false, false, (int) (System.currentTimeMillis() / 1000), req.hash); } })); } } - private void processLoadedFeaturedStickers(ArrayList res, ArrayList unreadStickers, boolean cache, int date, long hash) { + private void processLoadedFeaturedStickers(ArrayList res, ArrayList unreadStickers, boolean premium, boolean cache, int date, long hash) { AndroidUtilities.runOnUIThread(() -> { loadingFeaturedStickers = false; featuredStickersLoaded = true; @@ -1611,7 +1614,7 @@ public class MediaDataController extends BaseController { } if (!cache) { - putFeaturedStickersToCache(stickerSetsNew, unreadStickers, date, hash); + putFeaturedStickersToCache(stickerSetsNew, unreadStickers, date, hash, premium); } AndroidUtilities.runOnUIThread(() -> { unreadStickerSets = unreadStickers; @@ -1619,6 +1622,7 @@ public class MediaDataController extends BaseController { featuredStickerSets = stickerSetsNew; loadFeaturedHash = hash; loadFeaturedDate = date; + loadFeaturedPremium = premium; loadStickers(TYPE_FEATURED, true, false); getNotificationCenter().postNotificationName(NotificationCenter.featuredStickersDidLoad); }); @@ -1627,17 +1631,17 @@ public class MediaDataController extends BaseController { } } else { AndroidUtilities.runOnUIThread(() -> loadFeaturedDate = date); - putFeaturedStickersToCache(null, null, date, 0); + putFeaturedStickersToCache(null, null, date, 0, premium); } }); } - private void putFeaturedStickersToCache(ArrayList stickers, ArrayList unreadStickers, int date, long hash) { + private void putFeaturedStickersToCache(ArrayList stickers, ArrayList unreadStickers, int date, long hash, boolean premium) { ArrayList stickersFinal = stickers != null ? new ArrayList<>(stickers) : null; getMessagesStorage().getStorageQueue().postRunnable(() -> { try { if (stickersFinal != null) { - SQLitePreparedStatement state = getMessagesStorage().getDatabase().executeFast("REPLACE INTO stickers_featured VALUES(?, ?, ?, ?, ?)"); + SQLitePreparedStatement state = getMessagesStorage().getDatabase().executeFast("REPLACE INTO stickers_featured VALUES(?, ?, ?, ?, ?, ?)"); state.requery(); int size = 4; for (int a = 0; a < stickersFinal.size(); a++) { @@ -1658,6 +1662,7 @@ public class MediaDataController extends BaseController { state.bindByteBuffer(3, data2); state.bindInteger(4, date); state.bindLong(5, hash); + state.bindInteger(6, premium ? 1 : 0); state.step(); data.reuse(); data2.reuse(); @@ -1707,7 +1712,7 @@ public class MediaDataController extends BaseController { unreadStickerSets.clear(); loadFeaturedHash = calcFeaturedStickersHash(featuredStickerSets); getNotificationCenter().postNotificationName(NotificationCenter.featuredStickersDidLoad); - putFeaturedStickersToCache(featuredStickerSets, unreadStickerSets, loadFeaturedDate, loadFeaturedHash); + putFeaturedStickersToCache(featuredStickerSets, unreadStickerSets, loadFeaturedDate, loadFeaturedHash, loadFeaturedPremium); if (query) { TLRPC.TL_messages_readFeaturedStickers req = new TLRPC.TL_messages_readFeaturedStickers(); getConnectionsManager().sendRequest(req, (response, error) -> { @@ -1743,7 +1748,7 @@ public class MediaDataController extends BaseController { readingStickerSets.remove(id); loadFeaturedHash = calcFeaturedStickersHash(featuredStickerSets); getNotificationCenter().postNotificationName(NotificationCenter.featuredStickersDidLoad); - putFeaturedStickersToCache(featuredStickerSets, unreadStickerSets, loadFeaturedDate, loadFeaturedHash); + putFeaturedStickersToCache(featuredStickerSets, unreadStickerSets, loadFeaturedDate, loadFeaturedHash, loadFeaturedPremium); }, 1000); } diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java index 1a6d12337..0356cf05f 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesController.java @@ -873,11 +873,17 @@ public class MessagesController extends BaseController implements NotificationCe }; private static volatile MessagesController[] Instance = new MessagesController[UserConfig.MAX_ACCOUNT_COUNT]; + private static volatile Object[] lockObjects = new Object[UserConfig.MAX_ACCOUNT_COUNT]; + static { + for (int i = 0; i < UserConfig.MAX_ACCOUNT_COUNT; i++) { + lockObjects[i] = new Object(); + } + } public static MessagesController getInstance(int num) { MessagesController localInstance = Instance[num]; if (localInstance == null) { - synchronized (MessagesController.class) { + synchronized (lockObjects[num]) { localInstance = Instance[num]; if (localInstance == null) { Instance[num] = localInstance = new MessagesController(num); diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java index f28f30799..eb73eb94c 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/MessagesStorage.java @@ -83,7 +83,7 @@ public class MessagesStorage extends BaseController { private CountDownLatch openSync = new CountDownLatch(1); private static volatile MessagesStorage[] Instance = new MessagesStorage[UserConfig.MAX_ACCOUNT_COUNT]; - private final static int LAST_DB_VERSION = 97; + private final static int LAST_DB_VERSION = 98; private boolean databaseMigrationInProgress; public boolean showClearDatabaseAlert; @@ -361,7 +361,7 @@ public class MessagesStorage extends BaseController { database.executeFast("CREATE TABLE dialog_settings(did INTEGER PRIMARY KEY, flags INTEGER);").stepThis().dispose(); database.executeFast("CREATE TABLE web_recent_v3(id TEXT, type INTEGER, image_url TEXT, thumb_url TEXT, local_url TEXT, width INTEGER, height INTEGER, size INTEGER, date INTEGER, document BLOB, PRIMARY KEY (id, type));").stepThis().dispose(); database.executeFast("CREATE TABLE stickers_v2(id INTEGER PRIMARY KEY, data BLOB, date INTEGER, hash INTEGER);").stepThis().dispose(); - database.executeFast("CREATE TABLE stickers_featured(id INTEGER PRIMARY KEY, data BLOB, unread BLOB, date INTEGER, hash INTEGER);").stepThis().dispose(); + database.executeFast("CREATE TABLE stickers_featured(id INTEGER PRIMARY KEY, data BLOB, unread BLOB, date INTEGER, hash INTEGER, premium INTEGER);").stepThis().dispose(); database.executeFast("CREATE TABLE stickers_dice(emoji TEXT PRIMARY KEY, data BLOB, date INTEGER);").stepThis().dispose(); database.executeFast("CREATE TABLE hashtag_recent_v2(id TEXT PRIMARY KEY, date INTEGER);").stepThis().dispose(); database.executeFast("CREATE TABLE webpage_pending_v2(id INTEGER, mid INTEGER, uid INTEGER, PRIMARY KEY (id, mid, uid));").stepThis().dispose(); @@ -1586,6 +1586,13 @@ public class MessagesStorage extends BaseController { version = 97; } + if (version == 97) { + database.executeFast("DROP TABLE IF EXISTS stickers_featured;").stepThis().dispose(); + database.executeFast("CREATE TABLE stickers_featured(id INTEGER PRIMARY KEY, data BLOB, unread BLOB, date INTEGER, hash INTEGER, premium INTEGER);").stepThis().dispose(); + database.executeFast("PRAGMA user_version = 98").stepThis().dispose(); + version = 98; + } + FileLog.d("MessagesStorage db migration finished"); AndroidUtilities.runOnUIThread(() -> { databaseMigrationInProgress = false; diff --git a/TMessagesProj/src/main/java/org/telegram/messenger/SharedConfig.java b/TMessagesProj/src/main/java/org/telegram/messenger/SharedConfig.java index e02743ff0..ee8b7f964 100644 --- a/TMessagesProj/src/main/java/org/telegram/messenger/SharedConfig.java +++ b/TMessagesProj/src/main/java/org/telegram/messenger/SharedConfig.java @@ -417,8 +417,8 @@ public class SharedConfig { configLoaded = true; try { - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { - WebView.setWebContentsDebuggingEnabled(debugWebView); + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && debugWebView) { + WebView.setWebContentsDebuggingEnabled(true); } } catch (Exception e) { FileLog.e(e); diff --git a/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java b/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java index 356156762..7a5d21881 100644 --- a/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java +++ b/TMessagesProj/src/main/java/org/telegram/tgnet/TLRPC.java @@ -7389,6 +7389,7 @@ public class TLRPC { public void serializeToStream(AbstractSerializedData stream) { stream.writeInt32(constructor); flags = nopremium ? (flags | 8) : (flags &~ 8); + flags = document != null ? (flags | 1) : (flags &~ 1); stream.writeInt32(flags); if ((flags & 1) != 0) { document.serializeToStream(stream); @@ -22949,7 +22950,6 @@ public class TLRPC { public static int constructor = 0x40699cd0; public void readParams(AbstractSerializedData stream, boolean exception) { - flags = stream.readInt32(exception); currency = stream.readString(exception); total_amount = stream.readInt64(exception); } @@ -38596,7 +38596,7 @@ public class TLRPC { public TL_chatInviteExported invite; public void readParams(AbstractSerializedData stream, boolean exception) { - invite = (TL_chatInviteExported) ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception); + invite = ExportedChatInvite.TLdeserialize(stream, stream.readInt32(exception), exception); } public void serializeToStream(AbstractSerializedData stream) { @@ -59978,6 +59978,10 @@ public class TLRPC { public void serializeToStream(AbstractSerializedData stream) { stream.writeInt32(constructor); } + + public void readParams(AbstractSerializedData stream, boolean exception) { + + } } public static class TL_phone_saveCallLog extends TLObject { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/AvatarPreviewer.java b/TMessagesProj/src/main/java/org/telegram/ui/AvatarPreviewer.java index a3d403ad9..a1b89730a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/AvatarPreviewer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/AvatarPreviewer.java @@ -383,6 +383,7 @@ public class AvatarPreviewer { @Override protected void onAttachedToWindow() { super.onAttachedToWindow(); + imageReceiver.onAttachedToWindow(); NotificationCenter.getInstance(UserConfig.selectedAccount).addObserver(this, NotificationCenter.fileLoaded); NotificationCenter.getInstance(UserConfig.selectedAccount).addObserver(this, NotificationCenter.fileLoadProgressChanged); } @@ -390,6 +391,7 @@ public class AvatarPreviewer { @Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); + imageReceiver.onDetachedFromWindow(); NotificationCenter.getInstance(UserConfig.selectedAccount).removeObserver(this, NotificationCenter.fileLoaded); NotificationCenter.getInstance(UserConfig.selectedAccount).removeObserver(this, NotificationCenter.fileLoadProgressChanged); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java index 2296c4fe3..670b16de0 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/ChatMessageCell.java @@ -15090,6 +15090,7 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate public static final int COMMENT = 496; public static final int POLL_HINT = 495; public static final int FORWARD = 494; + public static final int TRANSCRIBE = 493; private Path linkPath = new Path(); private RectF rectF = new RectF(); private Rect rect = new Rect(); @@ -15178,9 +15179,14 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate } sb.append(title); } - if (currentMessageObject.messageOwner.media != null && !TextUtils.isEmpty(currentMessageObject.caption)) { + if (currentMessageObject.isVoiceTranscriptionOpen()) { sb.append("\n"); - sb.append(currentMessageObject.caption); + sb.append(currentMessageObject.getVoiceTranscription()); + } else { + if (currentMessageObject.messageOwner.media != null && !TextUtils.isEmpty(currentMessageObject.caption)) { + sb.append("\n"); + sb.append(currentMessageObject.caption); + } } if (documentAttach != null) { if (documentAttachType == DOCUMENT_ATTACH_TYPE_VIDEO) { @@ -15343,6 +15349,10 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate seekBarAccessibilityDelegate.onInitializeAccessibilityNodeInfoInternal(info); } + if (useTranscribeButton && transcribeButton != null) { + info.addChild(ChatMessageCell.this, TRANSCRIBE); + } + int i; if (Build.VERSION.SDK_INT < Build.VERSION_CODES.N) { if (isChat && currentUser != null && !currentMessageObject.isOut()) { @@ -15666,6 +15676,16 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate rect.offset(pos[0], pos[1]); info.setBoundsInScreen(rect); info.setClickable(true); + } else if (virtualViewId == TRANSCRIBE) { + info.setClassName("android.widget.Button"); + info.setEnabled(true); + info.setText(currentMessageObject.isVoiceTranscriptionOpen() ? LocaleController.getString("AccActionCloseTranscription", R.string.AccActionCloseTranscription) : LocaleController.getString("AccActionOpenTranscription", R.string.AccActionOpenTranscription)); + info.addAction(AccessibilityNodeInfo.ACTION_CLICK); + rect.set((int) transcribeX, (int) transcribeY, (int) (transcribeX + AndroidUtilities.dp(30)), (int) (transcribeY + AndroidUtilities.dp(30))); + info.setBoundsInParent(rect); + rect.offset(pos[0], pos[1]); + info.setBoundsInScreen(rect); + info.setClickable(true); } info.setFocusable(true); info.setVisibleToUser(true); @@ -15755,6 +15775,8 @@ public class ChatMessageCell extends BaseCell implements SeekBar.SeekBarDelegate delegate.didPressCommentButton(ChatMessageCell.this); } } + } else if (virtualViewId == TRANSCRIBE && transcribeButton != null) { + transcribeButton.onTap(); } } else if (action == AccessibilityNodeInfo.ACTION_LONG_CLICK) { ClickableSpan link = getLinkById(virtualViewId, virtualViewId >= LINK_CAPTION_IDS_START); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/StickerEmojiCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/StickerEmojiCell.java index 216ff6138..fea8b2d3a 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/StickerEmojiCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/StickerEmojiCell.java @@ -82,7 +82,7 @@ public class StickerEmojiCell extends FrameLayout implements NotificationCenter. Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG); paint.setColor(Theme.getColor(Theme.key_featuredStickers_addButton)); - premiumIconView = new PremiumLockIconView(context, PremiumLockIconView.TYPE_STICKERS); + premiumIconView = new PremiumLockIconView(context, PremiumLockIconView.TYPE_STICKERS_PREMIUM_LOCKED); premiumIconView.setImageReceiver(imageView.getImageReceiver()); premiumIconView.setPadding(AndroidUtilities.dp(4), AndroidUtilities.dp(4), AndroidUtilities.dp(4), AndroidUtilities.dp(4)); premiumIconView.setImageReceiver(imageView.getImageReceiver()); @@ -213,18 +213,26 @@ public class StickerEmojiCell extends FrameLayout implements NotificationCenter. } private void updatePremiumStatus(boolean animated) { - float alpha; - if (isPremiumSticker && !UserConfig.getInstance(currentAccount).isPremium()) { - alpha = 0.5f; + if (isPremiumSticker) { showPremiumLock = true; } else { - alpha = 1f; showPremiumLock = false; } + FrameLayout.LayoutParams layoutParams = (LayoutParams) premiumIconView.getLayoutParams(); + if (!UserConfig.getInstance(currentAccount).isPremium()) { + layoutParams.height = layoutParams.width = AndroidUtilities.dp(24); + layoutParams.gravity = Gravity.BOTTOM | Gravity.CENTER_HORIZONTAL; + layoutParams.bottomMargin = layoutParams.rightMargin = 0; + premiumIconView.setPadding(AndroidUtilities.dp(4), AndroidUtilities.dp(4), AndroidUtilities.dp(4), AndroidUtilities.dp(4)); + } else { + layoutParams.height = layoutParams.width = AndroidUtilities.dp(16); + layoutParams.gravity = Gravity.BOTTOM | Gravity.RIGHT; + layoutParams.bottomMargin = AndroidUtilities.dp(8); + layoutParams.rightMargin = AndroidUtilities.dp(8); + premiumIconView.setPadding(AndroidUtilities.dp(1), AndroidUtilities.dp(1), AndroidUtilities.dp(1), AndroidUtilities.dp(1)); + } + premiumIconView.setLocked(!UserConfig.getInstance(currentAccount).isPremium()); AndroidUtilities.updateViewVisibilityAnimated(premiumIconView, showPremiumLock, 0.9f, animated); -// if (!animated) { -// premiumAlpha = alpha; -// } invalidate(); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 29afc2233..45249d126 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -250,6 +250,7 @@ import org.telegram.ui.Components.StickersAlert; import org.telegram.ui.Components.TextSelectionHint; import org.telegram.ui.Components.TextStyleSpan; import org.telegram.ui.Components.ThemeEditorView; +import org.telegram.ui.Components.TranscribeButton; import org.telegram.ui.Components.TranslateAlert; import org.telegram.ui.Components.TrendingStickersAlert; import org.telegram.ui.Components.TypefaceSpan; @@ -20939,6 +20940,9 @@ ChatActivity extends BaseFragment implements NotificationCenter.NotificationCent if (!TextUtils.isEmpty(restrictionReason)) { return restrictionReason; } + if (messageObject.isVoiceTranscriptionOpen() && !TranscribeButton.isTranscribing(messageObject)) { + return messageObject.getVoiceTranscription(); + } if (messageObject.caption != null) { return messageObject.caption; } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/EditTextBoldCursor.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/EditTextBoldCursor.java index 91ed7c2f2..0a62881f8 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/EditTextBoldCursor.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/EditTextBoldCursor.java @@ -847,7 +847,8 @@ public class EditTextBoldCursor extends EditTextEffects { } } - int bottom = (int) lineY; + int scrollHeight = (getLayout() == null ? 0 : getLayout().getHeight()) - getMeasuredHeight() + getPaddingBottom() + getPaddingTop(); + int bottom = (int) lineY + getScrollY() + Math.min(Math.max(0, scrollHeight - getScrollY()), AndroidUtilities.dp(2)); int centerX = lastTouchX < 0 ? getMeasuredWidth() / 2 : lastTouchX, maxWidth = Math.max(centerX, getMeasuredWidth() - centerX) * 2; if (lineActiveness < 1f) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiView.java index 46ca75bed..1179588c3 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/EmojiView.java @@ -4265,7 +4265,9 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific } Object pack = rowStartPack.get(row); if (pack instanceof String) { - if ("recent".equals(pack)) { + if ("premium".equals(pack)) { + return premiumTabNum; + } else if ("recent".equals(pack)) { return recentTabNum; } else { return favTabNum; @@ -4476,7 +4478,7 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific } case 5: { StickerSetNameCell cell = (StickerSetNameCell) holder.itemView; - cell.setText(LocaleController.getString("FeaturedStickers", R.string.FeaturedStickers), R.drawable.msg_close); + cell.setText(MediaDataController.getInstance(currentAccount).loadFeaturedPremium ? LocaleController.getString("FeaturedStickersPremium", R.string.FeaturedStickersPremium) : LocaleController.getString("FeaturedStickers", R.string.FeaturedStickers), R.drawable.msg_close); break; } } @@ -4566,7 +4568,13 @@ public class EmojiView extends FrameLayout implements NotificationCenter.Notific if (pack != null) { rowStartPack.put(startRow + b, pack); } else { - rowStartPack.put(startRow + b, a == -1 ? "recent" : "fav"); + if (a == -1) { + rowStartPack.put(startRow + b, "premium"); + } else if (a == -2) { + rowStartPack.put(startRow + b, "recent"); + } else { + rowStartPack.put(startRow + b, "fav"); + } } } totalItems += count * stickersPerRow + 1; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumLockIconView.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumLockIconView.java index 6c7791aed..5e0e8efc9 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumLockIconView.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumLockIconView.java @@ -21,11 +21,13 @@ import org.telegram.ui.Components.voip.CellFlickerDrawable; public class PremiumLockIconView extends ImageView { public static int TYPE_REACTIONS = 0; - public static int TYPE_STICKERS = 1; + public static int TYPE_STICKERS_PREMIUM_LOCKED = 1; + private final int type; public boolean isEnter; private float[] colorFloat = new float[3]; StarParticlesView.Drawable starParticles; + private boolean locked; public PremiumLockIconView(Context context, int type) { super(context); @@ -174,7 +176,7 @@ public class PremiumLockIconView extends ImageView { int c1 = currentColor; int c2; Color.colorToHSV(c1, colorFloat); - colorFloat[1] *= 2; + colorFloat[1] *= locked ? 2 : 1; if (colorFloat[2] > 0.7f) { colorFloat[2] = 0.7f; } @@ -216,4 +218,10 @@ public class PremiumLockIconView extends ImageView { setScaleX(0); setScaleY(0); } + + public void setLocked(boolean locked) { + if (type != TYPE_REACTIONS) { + setImageResource(locked ? R.drawable.msg_mini_premiumlock : R.drawable.msg_mini_stickerstar); + } + } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumPreviewBottomSheet.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumPreviewBottomSheet.java index 268bfc43b..3d5f76979 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumPreviewBottomSheet.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/Premium/PremiumPreviewBottomSheet.java @@ -26,6 +26,7 @@ import org.telegram.messenger.LocaleController; import org.telegram.messenger.MediaDataController; import org.telegram.messenger.NotificationCenter; import org.telegram.messenger.R; +import org.telegram.messenger.UserConfig; import org.telegram.messenger.Utilities; import org.telegram.tgnet.TLRPC; import org.telegram.ui.ActionBar.BaseFragment; @@ -101,7 +102,9 @@ public class PremiumPreviewBottomSheet extends BottomSheetWithRecyclerListView { rowCount += premiumFeatures.size(); featuresEndRow = rowCount; sectionRow = rowCount++; - buttonRow = rowCount++; + if (!UserConfig.getInstance(currentAccount).isPremium()) { + buttonRow = rowCount++; + } recyclerListView.setPadding(AndroidUtilities.dp(6), 0, AndroidUtilities.dp(6), 0); recyclerListView.setOnItemClickListener(new RecyclerListView.OnItemClickListener() { @Override @@ -154,10 +157,11 @@ public class PremiumPreviewBottomSheet extends BottomSheetWithRecyclerListView { buttonDivider.getLayoutParams().height = 1; AndroidUtilities.updateViewVisibilityAnimated(buttonDivider, true, 1f, false); - buttonContainer.addView(premiumButtonView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.CENTER_VERTICAL, 16, 0, 16, 0)); - buttonContainer.setBackgroundColor(getThemedColor(Theme.key_dialogBackground)); - containerView.addView(buttonContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 68, Gravity.BOTTOM)); - + if (!UserConfig.getInstance(currentAccount).isPremium()) { + buttonContainer.addView(premiumButtonView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 48, Gravity.CENTER_VERTICAL, 16, 0, 16, 0)); + buttonContainer.setBackgroundColor(getThemedColor(Theme.key_dialogBackground)); + containerView.addView(buttonContainer, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, 68, Gravity.BOTTOM)); + } } @Override diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Components/TranscribeButton.java b/TMessagesProj/src/main/java/org/telegram/ui/Components/TranscribeButton.java index 869014a1f..9457c0ec7 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Components/TranscribeButton.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Components/TranscribeButton.java @@ -151,31 +151,7 @@ public class TranscribeButton { public boolean onTouch(int action, float x, float y) { if (action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL) { if (pressed && action == MotionEvent.ACTION_UP) { - boolean processClick, toOpen = !shouldBeOpen; - if (!shouldBeOpen) { - processClick = !loading; - if (premium && parent.getMessageObject().isSent()) { - setLoading(true, true); - } - } else { - processClick = true; - setOpen(false, true); - setLoading(false, true); - } - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && selectorDrawable instanceof RippleDrawable) { - selectorDrawable.setState(StateSet.NOTHING); - parent.invalidate(); - } - pressed = false; - if (processClick) { - if (!premium && toOpen) { - if (parent.getDelegate() != null) { - parent.getDelegate().needShowPremiumFeatures(PremiumPreviewFragment.featureTypeToServerString(PremiumPreviewFragment.PREMIUM_FEATURE_VOICE_TO_TEXT)); - } - } else { - transcribePressed(parent.getMessageObject(), toOpen); - } - } + onTap(); return true; } pressed = false; @@ -195,6 +171,34 @@ public class TranscribeButton { return true; } + public void onTap() { + boolean processClick, toOpen = !shouldBeOpen; + if (!shouldBeOpen) { + processClick = !loading; + if (premium && parent.getMessageObject().isSent()) { + setLoading(true, true); + } + } else { + processClick = true; + setOpen(false, true); + setLoading(false, true); + } + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP && selectorDrawable instanceof RippleDrawable) { + selectorDrawable.setState(StateSet.NOTHING); + parent.invalidate(); + } + pressed = false; + if (processClick) { + if (!premium && toOpen) { + if (parent.getDelegate() != null) { + parent.getDelegate().needShowPremiumFeatures(PremiumPreviewFragment.featureTypeToServerString(PremiumPreviewFragment.PREMIUM_FEATURE_VOICE_TO_TEXT)); + } + } else { + transcribePressed(parent.getMessageObject(), toOpen); + } + } + } + public void setColor(boolean isOut, int color, int grayColor) { boolean disabled = !premium; // if (disabled) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/EmojiAnimationsOverlay.java b/TMessagesProj/src/main/java/org/telegram/ui/EmojiAnimationsOverlay.java index 0f37d2b2f..fd972db92 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/EmojiAnimationsOverlay.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/EmojiAnimationsOverlay.java @@ -512,7 +512,7 @@ public class EmojiAnimationsOverlay implements NotificationCenter.NotificationCe } private void showStickerSetBulletin(TLRPC.TL_messages_stickerSet stickerSet, MessageObject messageObject) { - if (MessagesController.getInstance(currentAccount).premiumLocked) { + if (MessagesController.getInstance(currentAccount).premiumLocked || chatActivity.getParentActivity() == null) { return; } StickerSetBulletinLayout layout = new StickerSetBulletinLayout(contentLayout.getContext(), null, StickerSetBulletinLayout.TYPE_EMPTY, messageObject.getDocument(), chatActivity.getResourceProvider()); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/GroupStickersActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/GroupStickersActivity.java index 38018242d..d0ab0a93e 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/GroupStickersActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/GroupStickersActivity.java @@ -381,7 +381,9 @@ public class GroupStickersActivity extends BaseFragment implements NotificationC NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.chatInfoDidLoad, info, 0, true, false); finishFragment(); } else { - Toast.makeText(getParentActivity(), LocaleController.getString("ErrorOccurred", R.string.ErrorOccurred) + "\n" + error.text, Toast.LENGTH_SHORT).show(); + if (getParentActivity() != null) { + Toast.makeText(getParentActivity(), LocaleController.getString("ErrorOccurred", R.string.ErrorOccurred) + "\n" + error.text, Toast.LENGTH_SHORT).show(); + } } })); } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PaymentFormActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/PaymentFormActivity.java index cafd7a086..659e43e77 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/PaymentFormActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/PaymentFormActivity.java @@ -3234,7 +3234,7 @@ public class PaymentFormActivity extends BaseFragment implements NotificationCen } case STEP_CHECKOUT: NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.paymentFinished); - if (botUser.username != null && botUser.username.equalsIgnoreCase(getMessagesController().premiumBotUsername) || Objects.equals(invoiceSlug, getMessagesController().premiumInvoiceSlug)) { + if (botUser.username != null && botUser.username.equalsIgnoreCase(getMessagesController().premiumBotUsername) || invoiceSlug != null && getMessagesController().premiumInvoiceSlug != null && Objects.equals(invoiceSlug, getMessagesController().premiumInvoiceSlug)) { for (BaseFragment fragment : new ArrayList<>(getParentLayout().fragmentsStack)) { if (fragment instanceof ChatActivity || fragment instanceof PremiumPreviewFragment) { fragment.removeSelfFromStack(); diff --git a/TMessagesProj/src/main/java/org/telegram/ui/PremiumPreviewFragment.java b/TMessagesProj/src/main/java/org/telegram/ui/PremiumPreviewFragment.java index 3648d2ce3..97dcbc7d0 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/PremiumPreviewFragment.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/PremiumPreviewFragment.java @@ -235,7 +235,7 @@ public class PremiumPreviewFragment extends BaseFragment implements Notification shadowDrawable.getPadding(padding); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - statusBarHeight = AndroidUtilities.statusBarHeight; + statusBarHeight = AndroidUtilities.isTablet() ? 0 : AndroidUtilities.statusBarHeight; } contentView = new FrameLayout(context) { @@ -269,7 +269,7 @@ public class PremiumPreviewFragment extends BaseFragment implements Notification isLandscapeMode = false; } if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { - statusBarHeight = AndroidUtilities.statusBarHeight; + statusBarHeight = AndroidUtilities.isTablet() ? 0 : AndroidUtilities.statusBarHeight; } backgroundView.measure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(0, MeasureSpec.UNSPECIFIED)); particlesView.getLayoutParams().height = backgroundView.getMeasuredHeight(); @@ -633,7 +633,7 @@ public class PremiumPreviewFragment extends BaseFragment implements Notification NumberFormat numberFormat = NumberFormat.getCurrencyInstance(); numberFormat.setCurrency(currency); - return LocaleController.formatString(R.string.SubscribeToPremium, numberFormat.format(premiumPromo.monthly_amount / 100f)); + return LocaleController.formatString(R.string.SubscribeToPremium, numberFormat.format(premiumPromo.monthly_amount / Math.pow(10, BillingController.getInstance().getCurrencyExp(premiumPromo.currency)))); } } diff --git a/TMessagesProj/src/main/java/org/telegram/ui/SecretMediaViewer.java b/TMessagesProj/src/main/java/org/telegram/ui/SecretMediaViewer.java index 9a6b36d90..d45347ad1 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/SecretMediaViewer.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/SecretMediaViewer.java @@ -94,6 +94,19 @@ public class SecretMediaViewer implements NotificationCenter.NotificationCenterD protected boolean drawChild(Canvas canvas, View child, long drawingTime) { return child != aspectRatioFrameLayout && super.drawChild(canvas, child, drawingTime); } + + + @Override + protected void onAttachedToWindow() { + super.onAttachedToWindow(); + centerImage.onAttachedToWindow(); + } + + @Override + protected void onDetachedFromWindow() { + super.onDetachedFromWindow(); + centerImage.onDetachedFromWindow(); + } } private class SecretDeleteTimer extends FrameLayout { diff --git a/TMessagesProj/src/main/res/drawable-hdpi/msg_mini_stickerstar.png b/TMessagesProj/src/main/res/drawable-hdpi/msg_mini_stickerstar.png new file mode 100644 index 000000000..b2318b5bd Binary files /dev/null and b/TMessagesProj/src/main/res/drawable-hdpi/msg_mini_stickerstar.png differ diff --git a/TMessagesProj/src/main/res/drawable-mdpi/msg_mini_stickerstar.png b/TMessagesProj/src/main/res/drawable-mdpi/msg_mini_stickerstar.png new file mode 100644 index 000000000..6e5c81323 Binary files /dev/null and b/TMessagesProj/src/main/res/drawable-mdpi/msg_mini_stickerstar.png differ diff --git a/TMessagesProj/src/main/res/drawable-xhdpi/msg_mini_stickerstar.png b/TMessagesProj/src/main/res/drawable-xhdpi/msg_mini_stickerstar.png new file mode 100644 index 000000000..ec8c37e75 Binary files /dev/null and b/TMessagesProj/src/main/res/drawable-xhdpi/msg_mini_stickerstar.png differ diff --git a/TMessagesProj/src/main/res/drawable-xxhdpi/msg_mini_stickerstar.png b/TMessagesProj/src/main/res/drawable-xxhdpi/msg_mini_stickerstar.png new file mode 100644 index 000000000..7ec074743 Binary files /dev/null and b/TMessagesProj/src/main/res/drawable-xxhdpi/msg_mini_stickerstar.png differ diff --git a/TMessagesProj/src/main/res/values/strings.xml b/TMessagesProj/src/main/res/values/strings.xml index 64c33a217..a83da7720 100644 --- a/TMessagesProj/src/main/res/values/strings.xml +++ b/TMessagesProj/src/main/res/values/strings.xml @@ -4776,6 +4776,8 @@ Forwarded origin Enter selection mode Chat Preview + Open Voice Transcription + Close Transcription Emoji, stickers, and GIFs Attach media Send silently @@ -5446,4 +5448,5 @@ Tools to set the default folder, auto-archive and hide new chats from non-contacts. Owners of **Telegram Premium** accounts have exclusive acces to multiple additional features. Remove ads such as this one by subscribing to Telegram Premium. + Trending Premium Stickers