mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 07:35:12 +00:00
Add .jpg to inputFile filename when photo is sent.
Server has some extensions checking for inputMediaUploadedPhoto, so force the extension to be .jpg anyway. It doesn't matter, because the filename from inputFile is not used anywhere. Also own PhotoData::UploadingData through std::unique_ptr.
This commit is contained in:
@@ -859,9 +859,7 @@ PhotoData::PhotoData(const PhotoId &id, const uint64 &access, int32 date, const
|
||||
, date(date)
|
||||
, thumb(thumb)
|
||||
, medium(medium)
|
||||
, full(full)
|
||||
, peer(0)
|
||||
, uploadingData(0) {
|
||||
, full(full) {
|
||||
}
|
||||
|
||||
void PhotoData::automaticLoad(const HistoryItem *item) {
|
||||
@@ -926,7 +924,7 @@ int32 PhotoData::loadOffset() const {
|
||||
}
|
||||
|
||||
bool PhotoData::uploading() const {
|
||||
return uploadingData;
|
||||
return !!uploadingData;
|
||||
}
|
||||
|
||||
void PhotoData::forget() {
|
||||
@@ -950,10 +948,6 @@ ImagePtr PhotoData::makeReplyPreview() {
|
||||
return replyPreview;
|
||||
}
|
||||
|
||||
PhotoData::~PhotoData() {
|
||||
delete base::take(uploadingData);
|
||||
}
|
||||
|
||||
void PhotoOpenClickHandler::onClickImpl() const {
|
||||
App::wnd()->showPhoto(this, App::hoveredLinkItem() ? App::hoveredLinkItem() : App::contextItem());
|
||||
}
|
||||
|
Reference in New Issue
Block a user