mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Encapsulated DcOptions to an independent class.
This commit is contained in:
@@ -829,14 +829,13 @@ int32 state(mtpRequestId requestId) {
|
||||
}
|
||||
|
||||
void finish() {
|
||||
for (Sessions::iterator i = sessions.begin(), e = sessions.end(); i != e; ++i) {
|
||||
i.value()->kill();
|
||||
delete i.value();
|
||||
}
|
||||
sessions.clear();
|
||||
mainSession = nullptr;
|
||||
for (auto session : base::take(sessions)) {
|
||||
session->kill();
|
||||
delete session;
|
||||
}
|
||||
|
||||
for_const (internal::Connection *connection, quittingConnections) {
|
||||
for_const (auto connection, quittingConnections) {
|
||||
connection->waitTillFinish();
|
||||
delete connection;
|
||||
}
|
||||
@@ -886,11 +885,6 @@ void clearGlobalHandlers() {
|
||||
setSessionResetHandler(0);
|
||||
}
|
||||
|
||||
void updateDcOptions(const QVector<MTPDcOption> &options) {
|
||||
internal::updateDcOptions(options);
|
||||
Local::writeSettings();
|
||||
}
|
||||
|
||||
AuthKeysMap getKeys() {
|
||||
return internal::getAuthKeys();
|
||||
}
|
||||
@@ -903,8 +897,4 @@ void setKey(int dc, const AuthKey::Data &key) {
|
||||
return internal::setAuthKey(dc, std::move(keyPtr));
|
||||
}
|
||||
|
||||
QReadWriteLock *dcOptionsMutex() {
|
||||
return internal::dcOptionsMutex();
|
||||
}
|
||||
|
||||
} // namespace MTP
|
||||
|
||||
Reference in New Issue
Block a user