mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Warn on passport save before upload is finished.
This commit is contained in:
@@ -1065,6 +1065,13 @@ void PanelController::processValueSaveFinished(
|
||||
}
|
||||
}
|
||||
|
||||
bool PanelController::uploadingScopeScan() const {
|
||||
Expects(_editValue != nullptr);
|
||||
|
||||
return _form->uploadingScan(_editValue)
|
||||
|| (_editDocument && _form->uploadingScan(_editDocument));
|
||||
}
|
||||
|
||||
bool PanelController::savingScope() const {
|
||||
Expects(_editValue != nullptr);
|
||||
|
||||
@@ -1179,7 +1186,10 @@ void PanelController::saveScope(ValueMap &&data, ValueMap &&filesData) {
|
||||
Expects(_panel != nullptr);
|
||||
Expects(_editValue != nullptr);
|
||||
|
||||
if (savingScope()) {
|
||||
if (uploadingScopeScan()) {
|
||||
showToast(lang(lng_passport_wait_upload));
|
||||
return;
|
||||
} else if (savingScope()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -144,6 +144,7 @@ private:
|
||||
void processVerificationNeeded(not_null<const Value*> value);
|
||||
|
||||
bool savingScope() const;
|
||||
bool uploadingScopeScan() const;
|
||||
bool hasValueDocument() const;
|
||||
bool hasValueFields() const;
|
||||
ScanInfo collectScanInfo(const EditFile &file) const;
|
||||
|
||||
Reference in New Issue
Block a user