2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Correctly check media when editing files.

This commit is contained in:
John Preston
2020-10-20 11:19:48 +03:00
parent c4af731b19
commit a614ccad97
16 changed files with 155 additions and 187 deletions

View File

@@ -33,6 +33,7 @@ class InputField;
class EmojiButton;
class IconButton;
class Checkbox;
enum class AlbumType;
} // namespace Ui
namespace Window {
@@ -93,6 +94,7 @@ private:
int errorTopSkip() const;
void createEditMediaButton();
bool setPreparedList(Ui::PreparedList &&list);
inline QString getNewMediaPath() {
return _preparedList.files.empty()
@@ -138,8 +140,8 @@ private:
object_ptr<Ui::IconButton> _editMedia = nullptr;
Ui::SlideWrap<Ui::RpWidget> *_wayWrap = nullptr;
QString _newMediaPath;
Ui::AlbumType _albumType = Ui::AlbumType();
bool _isAllowedEditMedia = false;
bool _isAlbum = false;
bool _asFile = false;
rpl::event_stream<> _editMediaClicks;