mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-07 15:43:55 +02:00
parent
6660206e61
commit
39777f6149
2 changed files with 19 additions and 14 deletions
|
@ -924,6 +924,22 @@ void SendFilesBox::setInnerFocus() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SendFilesBox::saveSendWaySettings() {
|
||||||
|
auto way = _sendWay.current();
|
||||||
|
auto oldWay = Core::App().settings().sendFilesWay();
|
||||||
|
if (_groupFiles->isHidden()) {
|
||||||
|
way.setGroupFiles(oldWay.groupFiles());
|
||||||
|
}
|
||||||
|
if (_list.overrideSendImagesAsPhotos == way.sendImagesAsPhotos()
|
||||||
|
|| _sendImagesAsPhotos->isHidden()) {
|
||||||
|
way.setSendImagesAsPhotos(oldWay.sendImagesAsPhotos());
|
||||||
|
}
|
||||||
|
if (way != oldWay) {
|
||||||
|
Core::App().settings().setSendFilesWay(way);
|
||||||
|
Core::App().saveSettingsDelayed();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void SendFilesBox::send(
|
void SendFilesBox::send(
|
||||||
Api::SendOptions options,
|
Api::SendOptions options,
|
||||||
bool ctrlShiftEnter) {
|
bool ctrlShiftEnter) {
|
||||||
|
@ -939,19 +955,7 @@ void SendFilesBox::send(
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto way = _sendWay.current();
|
saveSendWaySettings();
|
||||||
auto oldWay = Core::App().settings().sendFilesWay();
|
|
||||||
if (_groupFiles->isHidden()) {
|
|
||||||
way.setGroupFiles(oldWay.groupFiles());
|
|
||||||
}
|
|
||||||
if (_list.overrideSendImagesAsPhotos == way.sendImagesAsPhotos()
|
|
||||||
|| _sendImagesAsPhotos->isHidden()) {
|
|
||||||
way.setSendImagesAsPhotos(oldWay.sendImagesAsPhotos());
|
|
||||||
}
|
|
||||||
if (way != oldWay) {
|
|
||||||
Core::App().settings().setSendFilesWay(way);
|
|
||||||
Core::App().saveSettingsDelayed();
|
|
||||||
}
|
|
||||||
|
|
||||||
for (auto &block : _blocks) {
|
for (auto &block : _blocks) {
|
||||||
block.applyAlbumOrder();
|
block.applyAlbumOrder();
|
||||||
|
@ -963,7 +967,7 @@ void SendFilesBox::send(
|
||||||
: TextWithTags();
|
: TextWithTags();
|
||||||
_confirmedCallback(
|
_confirmedCallback(
|
||||||
std::move(_list),
|
std::move(_list),
|
||||||
way,
|
_sendWay.current(),
|
||||||
std::move(caption),
|
std::move(caption),
|
||||||
options,
|
options,
|
||||||
ctrlShiftEnter);
|
ctrlShiftEnter);
|
||||||
|
|
|
@ -135,6 +135,7 @@ private:
|
||||||
void sendSilent();
|
void sendSilent();
|
||||||
void sendScheduled();
|
void sendScheduled();
|
||||||
void captionResized();
|
void captionResized();
|
||||||
|
void saveSendWaySettings();
|
||||||
|
|
||||||
void setupDragArea();
|
void setupDragArea();
|
||||||
void refreshTitleText();
|
void refreshTitleText();
|
||||||
|
|
Loading…
Add table
Reference in a new issue