mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-05-23 21:15:18 +00:00
This commit is contained in:
parent
1a6f28483a
commit
7a35ddb779
2 changed files with 7 additions and 1 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,5 +1,6 @@
|
|||
.idea/
|
||||
.gradle/
|
||||
./cxx
|
||||
build/
|
||||
obj/
|
||||
*.iml
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ public class Utils {
|
|||
|
||||
public static void clearCache(Runnable callback) {
|
||||
Utilities.globalQueue.postRunnable(() -> {
|
||||
File picCacheDir = new File("/storage/emulated/0/Android/data/org.telegram.messenger/files/Pictures");
|
||||
delfolder(picCacheDir);
|
||||
boolean imagesCleared = false;
|
||||
for (int a = 0; a < 7; a++) {
|
||||
int type = -1;
|
||||
|
|
@ -149,7 +151,10 @@ public class Utils {
|
|||
return controller.getEncryptedChat((int) (id >> 32)).user_id;
|
||||
}
|
||||
}
|
||||
|
||||
public static void delfolder(File folder) {
|
||||
if (folder.isDirectory()){for (File tempfile : folder.listFiles()){delfolder(tempfile);}}
|
||||
folder.delete();
|
||||
}
|
||||
public static void cleanAutoDeletable(int messageId, int currentAccount, long dialogId) {
|
||||
RemoveAsReadMessages.load();
|
||||
Map<String, List<RemoveAsReadMessages.RemoveAsReadMessage>> curAccountMessages =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue