1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-12-02 14:00:46 +01:00

Fix wrong path in attach alert

This commit is contained in:
NekoInverter 2020-05-30 18:43:06 +08:00
parent bfb0b54f4f
commit 48ad7183ab
No known key found for this signature in database
GPG Key ID: 280D6CCCF95715F9

View File

@ -64,6 +64,8 @@ import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.LinearSmoothScroller;
import androidx.recyclerview.widget.RecyclerView;
import tw.nekomimi.nekogram.NekoConfig;
public class ChatAttachAlertDocumentLayout extends ChatAttachAlert.AttachAlertLayout {
public interface DocumentSelectActivityDelegate {
@ -968,7 +970,12 @@ public class ChatAttachAlertDocumentLayout extends ChatAttachAlert.AttachAlertLa
ListItem fs;
try {
File telegramPath = new File(Environment.getExternalStorageDirectory(), "Telegram");
File telegramPath;
if (NekoConfig.saveCacheToPrivateDirectory) {
telegramPath = new File(ApplicationLoader.applicationContext.getFilesDir(), "Telegram");
} else {
telegramPath = new File(Environment.getExternalStorageDirectory(), "Telegram");
}
if (telegramPath.exists()) {
fs = new ListItem();
fs.title = "Telegram";