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:
@@ -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;
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user