forked from mirror/monocles_chat_clean
fix up
This commit is contained in:
parent
fe675aa5da
commit
8a539a70e0
1 changed files with 6 additions and 11 deletions
|
@ -795,17 +795,12 @@ public class FileBackend {
|
|||
if ("ogg".equals(extension) && type != null && type.startsWith("audio/")) {
|
||||
extension = "oga";
|
||||
}
|
||||
try {
|
||||
String filename = "Sent" + File.separator + fileDateFormat.format(new Date(message.getTimeSent())) + "_" + message.getUuid().substring(0, 4);
|
||||
setupRelativeFilePath(message, String.format("%s.%s", filename, extension));
|
||||
copyFileToPrivateStorage(mXmppConnectionService.getFileBackend().getFile(message), uri);
|
||||
final String name = getDisplayNameFromUri(uri);
|
||||
if (name != null) {
|
||||
message.getFileParams().setName(name);
|
||||
}
|
||||
} catch (final XmppConnectionService.BlockedMediaException e) {
|
||||
message.setRelativeFilePath(null);
|
||||
message.setDeleted(true);
|
||||
String filename = "Sent" + File.separator + fileDateFormat.format(new Date(message.getTimeSent())) + "_" + message.getUuid().substring(0, 4);
|
||||
setupRelativeFilePath(message, String.format("%s.%s", filename, extension));
|
||||
copyFileToPrivateStorage(mXmppConnectionService.getFileBackend().getFile(message), uri);
|
||||
final String name = getDisplayNameFromUri(uri);
|
||||
if (name != null) {
|
||||
message.getFileParams().setName(name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue