fix: save to download
This commit is contained in:
parent
03cf279583
commit
bed2005e2e
@ -4150,7 +4150,7 @@ public class MediaController implements AudioManager.OnAudioFocusChangeListener,
|
||||
TLRPC.Document document = message.getDocument();
|
||||
if (!TextUtils.isEmpty(FileLoader.getDocumentFileName(document)) && FileLoader.canSaveAsFile(message)) {
|
||||
String filename = FileLoader.getDocumentFileName(document);
|
||||
File newDir = FileLoader.getDirectory(FileLoader.MEDIA_DIR_FILES);
|
||||
File newDir = FileLoader.getDirectory(FileLoader.MEDIA_DIR_DOCUMENT);
|
||||
if (newDir != null) {
|
||||
path = new File(newDir, filename).getAbsolutePath();
|
||||
}
|
||||
|
@ -27963,7 +27963,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
messageObjects.add(selectedObject);
|
||||
}
|
||||
MediaController.saveFilesFromMessages(getParentActivity(), getAccountInstance(), messageObjects, (count) -> {
|
||||
if (getParentActivity() == null || fragmentView == null) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
if (count > 0) {
|
||||
@ -27989,7 +27989,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
path = getFileLoader().getPathToMessage(selectedObject.messageOwner).toString();
|
||||
}
|
||||
MediaController.saveFile(path, getParentActivity(), 2, fileName, selectedObject.getDocument() != null ? selectedObject.getDocument().mime_type : "", uri -> {
|
||||
if (getParentActivity() == null || fragmentView == null) {
|
||||
if (getParentActivity() == null) {
|
||||
return;
|
||||
}
|
||||
final BulletinFactory.FileType fileType;
|
||||
|
Loading…
Reference in New Issue
Block a user