Test quota display, stale responses and startup directory retries
This commit is contained in:
1 parent
594017ba5f
commit
db6acf8662
2 files changed
+40
-2
No files matched your search
@@ -191,7 +191,11 @@ void MemberFileBrowser::refresh() {
|
||||
cancelRequest(m_quotaId); m_quotaId = 0; m_refreshGeneration++;
|
||||
m_quota->setToolTip(QString());
|
||||
m_quota->setText(owner() ? text("Loading quota…") : text("Select a member to see storage quota"));
|
||||
if (!server()) { m_status->setText(text("No media server in this group")); return; }
|
||||
if (!server()) {
|
||||
m_status->setText(text("No media server in this group"));
|
||||
if (owner()) m_quota->setText(text("Quota unavailable"));
|
||||
return;
|
||||
}
|
||||
requestQuota();
|
||||
mf_message q{}; q.command = MF_LIST; q.owner = owner();
|
||||
if (!copyPath(q.path, m_path) || !post(q)) { m_status->setText(text("Unable to request directory")); return; }
|
||||
@@ -232,6 +236,7 @@ void MemberFileBrowser::onResponse(const uint8_t* data, int length) {
|
||||
return;
|
||||
}
|
||||
m_quotaId = 0;
|
||||
m_quota->setToolTip(QString());
|
||||
if (r.status) {
|
||||
m_quota->setText(r.status == MF_BUSY ? text("Loading quota…") : text("Quota unavailable"));
|
||||
m_quota->setToolTip(QString::fromUtf8(mf_status_text(r.status)));
|
||||
|
||||
Reference in new issue
Block a user