2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Remember passport credentials for 30 minutes.

This commit is contained in:
John Preston
2018-07-10 19:41:11 +03:00
parent 9929bfb281
commit e3e8d083ea
15 changed files with 342 additions and 138 deletions

View File

@@ -35,6 +35,10 @@ class PanelController;
} // namespace View
} // namespace Export
namespace Passport {
struct SavedCredentials;
} // namespace Passport
namespace Data {
class Feed;
@@ -60,6 +64,12 @@ public:
void stopExportWithConfirmation(FnMut<void()> callback);
void stopExport();
const Passport::SavedCredentials *passportCredentials() const;
void rememberPassportCredentials(
Passport::SavedCredentials data,
TimeMs rememberFor);
void forgetPassportCredentials();
[[nodiscard]] base::Variable<bool> &contactsLoaded() {
return _contactsLoaded;
}
@@ -610,6 +620,11 @@ private:
MessageIdsList _mimeForwardIds;
using CredentialsWithGeneration = std::pair<
const Passport::SavedCredentials,
int>;
std::unique_ptr<CredentialsWithGeneration> _passportCredentials;
rpl::lifetime _lifetime;
};