Fix remaining review threads on the user alts tab

- Switch to the User Alts tab when it is created, so the first investigate
  click does not open it in the background.
- Treat an empty RespOk as "user not found" and use a generic message for
  error codes, matching what the server actually returns.
- Exclude the depth-0 seed row from the related-account count.
- Guard the reply with the requested user name so a stale response cannot
  overwrite a newer one.
- Move the duplicated formatEpoch body into widgets/utility/epoch_format.h.
This commit is contained in:
Lukas Brübach 2026-11-01 05:57:17 +01:00
parent 1e11f78ac2
commit ff6c0402a8
5 changed files with 51 additions and 11 deletions

View file

@ -1,5 +1,6 @@
#include "tab_moderation.h"
#include "../utility/epoch_format.h"
#include "abstract_client.h"
#include "libcockatrice/protocol/pb/admin_commands.pb.h"
#include "libcockatrice/protocol/pb/response.pb.h"
@ -215,10 +216,7 @@ void TabModeration::retranslateUi()
QString TabModeration::formatEpoch(quint64 ts) const
{
if (ts == 0) {
return tr("Unknown");
}
return QDateTime::fromSecsSinceEpoch(ts).toLocalTime().toString("yyyy-MM-dd HH:mm");
return formatEpochTimestamp(ts, tr("Unknown"));
}
void TabModeration::clearUserData()