mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 14:38:15 +00:00
Move non-settings session data to Data::Session.
Rename AuthSessionData to AuthSessionSettings, move data away.
This commit is contained in:
@@ -1433,7 +1433,7 @@ void SendFilesBox::initSendWay() {
|
||||
? SendFilesWay::Album
|
||||
: SendFilesWay::Photos;
|
||||
}
|
||||
const auto currentWay = Auth().data().sendFilesWay();
|
||||
const auto currentWay = Auth().settings().sendFilesWay();
|
||||
if (currentWay == SendFilesWay::Files) {
|
||||
return currentWay;
|
||||
} else if (currentWay == SendFilesWay::Album) {
|
||||
@@ -1756,7 +1756,7 @@ void SendFilesBox::send(bool ctrlShiftEnter) {
|
||||
const auto way = _sendWay ? _sendWay->value() : Way::Files;
|
||||
|
||||
if (_compressConfirm == CompressConfirm::Auto) {
|
||||
const auto oldWay = Auth().data().sendFilesWay();
|
||||
const auto oldWay = Auth().settings().sendFilesWay();
|
||||
if (way != oldWay) {
|
||||
// Check if the user _could_ use the old value, but didn't.
|
||||
if ((oldWay == Way::Album && _sendAlbum)
|
||||
@@ -1764,8 +1764,8 @@ void SendFilesBox::send(bool ctrlShiftEnter) {
|
||||
|| (oldWay == Way::Files && _sendFiles)
|
||||
|| (way == Way::Files && (_sendAlbum || _sendPhotos))) {
|
||||
// And in that case save it to settings.
|
||||
Auth().data().setSendFilesWay(way);
|
||||
Auth().saveDataDelayed();
|
||||
Auth().settings().setSendFilesWay(way);
|
||||
Auth().saveSettingsDelayed();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user