mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-23 03:18:49 +03:00
Resume sync when connectivity is established
This commit is contained in:
parent
1fc68c5b7f
commit
985530e99b
2 changed files with 8 additions and 1 deletions
|
@ -50,7 +50,7 @@ public:
|
||||||
void fetchUserAvatar(const QString &userId, const QUrl &avatarUrl);
|
void fetchUserAvatar(const QString &userId, const QUrl &avatarUrl);
|
||||||
void fetchOwnAvatar(const QUrl &avatar_url);
|
void fetchOwnAvatar(const QUrl &avatar_url);
|
||||||
void downloadImage(const QString &event_id, const QUrl &url);
|
void downloadImage(const QString &event_id, const QUrl &url);
|
||||||
void messages(const QString &room_id, const QString &from_token, int limit = 20) noexcept;
|
void messages(const QString &room_id, const QString &from_token, int limit = 30) noexcept;
|
||||||
void uploadImage(const QString &roomid, const QString &filename);
|
void uploadImage(const QString &roomid, const QString &filename);
|
||||||
void joinRoom(const QString &roomIdOrAlias);
|
void joinRoom(const QString &roomIdOrAlias);
|
||||||
void leaveRoom(const QString &roomId);
|
void leaveRoom(const QString &roomId);
|
||||||
|
|
|
@ -44,6 +44,13 @@ MatrixClient::MatrixClient(QString server, QObject *parent)
|
||||||
txn_id_ = settings.value("client/transaction_id", 1).toInt();
|
txn_id_ = settings.value("client/transaction_id", 1).toInt();
|
||||||
|
|
||||||
connect(this, SIGNAL(finished(QNetworkReply *)), this, SLOT(onResponse(QNetworkReply *)));
|
connect(this, SIGNAL(finished(QNetworkReply *)), this, SLOT(onResponse(QNetworkReply *)));
|
||||||
|
connect(this,
|
||||||
|
&QNetworkAccessManager::networkAccessibleChanged,
|
||||||
|
this,
|
||||||
|
[=](NetworkAccessibility status) {
|
||||||
|
if (status != NetworkAccessibility::Accessible)
|
||||||
|
setNetworkAccessible(NetworkAccessibility::Accessible);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue