Skip to content

Commit

Permalink
Update to 8.2.1 (2462)
Browse files Browse the repository at this point in the history
  • Loading branch information
xaxtix committed Nov 5, 2021
1 parent 09f95ec commit 1d379b9
Show file tree
Hide file tree
Showing 141 changed files with 11,629 additions and 5,548 deletions.
10 changes: 5 additions & 5 deletions TMessagesProj/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,11 @@ dependencies {
compileOnly 'org.checkerframework:checker-compat-qual:2.5.0'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
implementation 'com.google.firebase:firebase-config:21.0.1'
implementation 'com.google.firebase:firebase-datatransport:18.0.1'
implementation 'com.google.firebase:firebase-datatransport:18.1.0'
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.1'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'com.google.android.gms:play-services-vision:16.2.0'
implementation 'com.google.android.gms:play-services-vision:20.1.3'
implementation 'com.google.android.gms:play-services-wearable:17.1.0'
implementation 'com.google.android.gms:play-services-location:18.0.0'
implementation 'com.google.android.gms:play-services-wallet:18.1.3'
Expand Down Expand Up @@ -299,7 +299,7 @@ android {
}
}

defaultConfig.versionCode = 2432
defaultConfig.versionCode = 2462

applicationVariants.all { variant ->
variant.outputs.all { output ->
Expand All @@ -317,8 +317,8 @@ android {

defaultConfig {
minSdkVersion 16
targetSdkVersion 29
versionName "8.1.2"
targetSdkVersion 30
versionName "8.2.1"

vectorDrawables.generatedDensities = ['mdpi', 'hdpi', 'xhdpi', 'xxhdpi']

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*/
public class ChildHelper {

private static final boolean DEBUG = BuildVars.DEBUG_VERSION;
private static final boolean DEBUG = false;//BuildVars.DEBUG_VERSION;

private static final String TAG = "ChildrenHelper";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class LinearLayoutManager extends RecyclerView.LayoutManager implements

private static final String TAG = "LinearLayoutManager";

static final boolean DEBUG = BuildVars.DEBUG_VERSION;
static final boolean DEBUG = false;

public static final int HORIZONTAL = RecyclerView.HORIZONTAL;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ public SharedPreferences getNotificationsSettings() {
return MessagesController.getNotificationsSettings(currentAccount);
}

public MemberRequestsController getMemberRequestsController() {
return MemberRequestsController.getInstance(currentAccount);
}

public int getCurrentAccount() {
return currentAccount;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -529,10 +529,12 @@ public static void fillStatusBarHeight(Context context) {
if (context == null || AndroidUtilities.statusBarHeight > 0) {
return;
}
AndroidUtilities.statusBarHeight = getStatusBarHeight(context);
}

public static int getStatusBarHeight(Context context) {
int resourceId = context.getResources().getIdentifier("status_bar_height", "dimen", "android");
if (resourceId > 0) {
AndroidUtilities.statusBarHeight = context.getResources().getDimensionPixelSize(resourceId);
}
return resourceId > 0 ? context.getResources().getDimensionPixelSize(resourceId) : 0;
}

public static int getThumbForNameOrMime(String name, String mime, boolean media) {
Expand Down Expand Up @@ -2282,8 +2284,8 @@ public static void addMediaToGallery(Uri uri) {
}
}

private static File getAlbumDir(boolean secretChat) { //TODO scoped storage
if (secretChat || Build.VERSION.SDK_INT >= 23 && ApplicationLoader.applicationContext.checkSelfPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED) {
private static File getAlbumDir(boolean secretChat) {
if (secretChat || !BuildVars.NO_SCOPED_STORAGE || (Build.VERSION.SDK_INT >= 23 && ApplicationLoader.applicationContext.checkSelfPermission(android.Manifest.permission.READ_EXTERNAL_STORAGE) != PackageManager.PERMISSION_GRANTED)) {
return FileLoader.getDirectory(FileLoader.MEDIA_DIR_CACHE);
}
File storageDir = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,8 @@ protected final FileLoader getFileLoader() {
protected final FileRefController getFileRefController() {
return parentAccountInstance.getFileRefController();
}

protected final MemberRequestsController getMemberRequestsController() {
return parentAccountInstance.getMemberRequestsController();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,18 @@

import android.content.Context;
import android.content.SharedPreferences;
import android.os.Build;

public class BuildVars {

public static boolean DEBUG_VERSION = false;
public static boolean DEBUG_PRIVATE_VERSION = false;
public static boolean LOGS_ENABLED = false;
public static boolean DEBUG_PRIVATE_VERSION = false;
public static boolean USE_CLOUD_STRINGS = true;
public static boolean CHECK_UPDATES = true;
public static boolean NO_SCOPED_STORAGE = true/* || Build.VERSION.SDK_INT <= 28*/;
public static int BUILD_VERSION = 2432;
public static String BUILD_VERSION_STRING = "8.1.2";
public static boolean NO_SCOPED_STORAGE = Build.VERSION.SDK_INT <= 29;
public static int BUILD_VERSION = 2462;
public static String BUILD_VERSION_STRING = "8.2.1";
public static int APP_ID = 4;
public static String APP_HASH = "014b35b6184100b085b0d0572f9b5103";
public static String SMS_HASH = isStandaloneApp() ? "w0lkcmTZkKh" : (DEBUG_VERSION ? "O2P2z+/jBpJ" : "oLeq9AcOZkT");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1490,6 +1490,10 @@ public static boolean isMegagroup(TLRPC.Chat chat) {
return (chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden) && chat.megagroup;
}

public static boolean isChannelAndNotMegaGroup(TLRPC.Chat chat) {
return isChannel(chat) && !isMegagroup(chat);
}

public static boolean isMegagroup(int currentAccount, long chatId) {
TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chatId);
return ChatObject.isChannel(chat) && chat.megagroup;
Expand Down Expand Up @@ -1569,6 +1573,11 @@ public static boolean isChannel(long chatId, int currentAccount) {
return chat instanceof TLRPC.TL_channel || chat instanceof TLRPC.TL_channelForbidden;
}

public static boolean isChannelAndNotMegaGroup(long chatId, int currentAccount) {
TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chatId);
return isChannelAndNotMegaGroup(chat);
}

public static boolean isCanWriteToChannel(long chatId, int currentAccount) {
TLRPC.Chat chat = MessagesController.getInstance(currentAccount).getChat(chatId);
return ChatObject.canSendMessages(chat) || chat.megagroup;
Expand Down
Loading

0 comments on commit 1d379b9

Please sign in to comment.