Update to 7.8.1

This commit is contained in:
DrKLO 2021-07-15 17:24:57 +03:00
parent dd2b001b95
commit 3ac3c37dd2
429 changed files with 138188 additions and 2463 deletions

View file

@ -994,31 +994,35 @@ public class SharedConfig {
}
public static void checkSaveToGalleryFiles() {
try {
File telegramPath = new File(Environment.getExternalStorageDirectory(), "Telegram");
File imagePath = new File(telegramPath, "Telegram Images");
imagePath.mkdir();
File videoPath = new File(telegramPath, "Telegram Video");
videoPath.mkdir();
Utilities.globalQueue.postRunnable(() -> {
try {
if (saveToGallery) {
if (imagePath.isDirectory()) {
new File(imagePath, ".nomedia").delete();
}
if (videoPath.isDirectory()) {
new File(videoPath, ".nomedia").delete();
}
} else {
if (imagePath.isDirectory()) {
AndroidUtilities.createEmptyFile(new File(imagePath, ".nomedia"));
}
if (videoPath.isDirectory()) {
AndroidUtilities.createEmptyFile(new File(videoPath, ".nomedia"));
File telegramPath = new File(Environment.getExternalStorageDirectory(), "Telegram");
File imagePath = new File(telegramPath, "Telegram Images");
imagePath.mkdir();
File videoPath = new File(telegramPath, "Telegram Video");
videoPath.mkdir();
if (saveToGallery) {
if (imagePath.isDirectory()) {
new File(imagePath, ".nomedia").delete();
}
if (videoPath.isDirectory()) {
new File(videoPath, ".nomedia").delete();
}
} else {
if (imagePath.isDirectory()) {
AndroidUtilities.createEmptyFile(new File(imagePath, ".nomedia"));
}
if (videoPath.isDirectory()) {
AndroidUtilities.createEmptyFile(new File(videoPath, ".nomedia"));
}
}
} catch (Throwable e) {
FileLog.e(e);
}
} catch (Throwable e) {
FileLog.e(e);
}
});
}
public static int getChatSwipeAction(int currentAccount) {