mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
@@ -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();
|
||||||
|
Reference in New Issue
Block a user