mirror of
https://github.com/vale981/tdesktop
synced 2025-03-06 10:11:41 -05:00
Warn on passport save before upload is finished.
This commit is contained in:
parent
e3e8d083ea
commit
7be9e0fb94
3 changed files with 13 additions and 1 deletions
|
@ -1664,6 +1664,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
"lng_passport_error_bad_size" = "Sorry, this image has wrong dimensions.";
|
||||
"lng_passport_error_cant_read" = "Can't read this file. Please choose an image.";
|
||||
"lng_passport_bad_name" = "Please use latin characters only.";
|
||||
"lng_passport_wait_upload" = "Please wait while upload is finished.";
|
||||
|
||||
"lng_export_title" = "Export Personal Data";
|
||||
"lng_export_progress_title" = "Exporting personal data";
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue