feat: show acks on particles
This commit is contained in:
@@ -115,11 +115,29 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
connect(m_authManager, &AuthManager::signedOut, m_authDialog, &AuthDialog::reset);
|
||||
connect(m_authManager, &AuthManager::signedOut, m_authDialog, &AuthDialog::show);
|
||||
connect(m_authManager, &AuthManager::signedIn, this, [this]() {
|
||||
m_store->setCurrentUserEmail(m_authManager->sessionData()->email);
|
||||
m_store->loadStartupData();
|
||||
});
|
||||
connect(m_store, &Store::startupDataLoaded, this, [this]() {
|
||||
ui->topLevelParticlesView->expandAll();
|
||||
});
|
||||
connect(m_store, &Store::particleUpdated, this, [this](const QString &, const QString &particleId) {
|
||||
if (particleId == m_selectedParticleId)
|
||||
{
|
||||
const Particle *particle = m_store->particleById(particleId);
|
||||
if (particle && !particle->ackedByEmails.empty())
|
||||
{
|
||||
QStringList acked;
|
||||
for (const auto &email : particle->ackedByEmails)
|
||||
acked.append(email);
|
||||
ui->label_3->setText("Acked by: " + acked.join(", "));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->label_3->setText("");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// DocumentSend toolbar button opens text input dialog
|
||||
connect(ui->toolButton_3, &QToolButton::clicked, this, &MainWindow::showTextInputDialog);
|
||||
@@ -329,6 +347,7 @@ void MainWindow::onParticleSelectionChanged(const QItemSelection &selected, cons
|
||||
{
|
||||
ui->label->setText("");
|
||||
ui->label_2->setText("");
|
||||
ui->label_3->setText("");
|
||||
m_selectedParticleId.clear();
|
||||
m_selectedParticleRow = -1;
|
||||
updateStatusBar();
|
||||
@@ -352,6 +371,19 @@ void MainWindow::onParticleSelectionChanged(const QItemSelection &selected, cons
|
||||
ui->label->setText("");
|
||||
}
|
||||
|
||||
// Show ack info
|
||||
if (!particle->ackedByEmails.empty())
|
||||
{
|
||||
QStringList acked;
|
||||
for (const auto &email : particle->ackedByEmails)
|
||||
acked.append(email);
|
||||
ui->label_3->setText("Acked by: " + acked.join(", "));
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->label_3->setText("");
|
||||
}
|
||||
|
||||
// Mark seen on selection
|
||||
if (!particle->seen)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user