mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Refactored code.
- Refactored passing message id to edit media. - Removed get/setEditMedia from mainwidget. - Combined onEditMedia and onSendFileConfirm in single method. - Added argument in FileLoadTask to pass message id to edit media. - Renamed flags in apiwrap. - Added check for allowing edit media when use clipboard. - Removed unused fileIsValidForAlbum. - Removed LOGs. - Replaced _isNotAlbum with _isAlbum. - Removed _viaRemoteContent. - Removed _newMediaPath. - Added empty() to MessageGroupId.
This commit is contained in:
@@ -122,22 +122,6 @@ bool fileIsImage(const QString &name, const QString &mime) {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool fileIsValidForAlbum(const QString &name, const QString &mime) {
|
||||
QString lowermime = mime.toLower(), namelower = name.toLower();
|
||||
if (lowermime.startsWith(qstr("video/mp4"))
|
||||
|| lowermime.startsWith(qstr("image/jpeg"))
|
||||
|| lowermime.startsWith(qstr("image/jpg"))
|
||||
|| lowermime.startsWith(qstr("image/png"))) {
|
||||
return true;
|
||||
} else if (namelower.endsWith(qstr(".mp4"))
|
||||
|| namelower.endsWith(qstr(".jpg"))
|
||||
|| namelower.endsWith(qstr(".jpeg"))
|
||||
|| namelower.endsWith(qstr(".png"))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
QString FileNameUnsafe(
|
||||
const QString &title,
|
||||
const QString &filter,
|
||||
|
Reference in New Issue
Block a user