2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35: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

@@ -473,7 +473,7 @@ void SendFilesBox::preparePreview() {
void SendFilesBox::generatePreviewFrom(int fromBlock) {
Expects(fromBlock <= _blocks.size());
using Type = Ui::PreparedFile::AlbumType;
using Type = Ui::PreparedFile::Type;
const auto eraseFrom = _blocks.begin() + fromBlock;
for (auto i = eraseFrom; i != _blocks.end(); ++i) {
@@ -813,7 +813,7 @@ void SendFilesBox::refreshTitleText() {
if (count > 1) {
const auto imagesCount = ranges::count(
_list.files,
Ui::PreparedFile::AlbumType::Photo,
Ui::PreparedFile::Type::Photo,
&Ui::PreparedFile::type);
_titleText = (imagesCount == count)
? tr::lng_send_images_selected(tr::now, lt_count, count)