delay display when initially join
diff --git a/chatdialog.cpp b/chatdialog.cpp
index 7c354ad..2c33137 100644
--- a/chatdialog.cpp
+++ b/chatdialog.cpp
@@ -71,6 +71,8 @@
bind(&ChatDialog::processRemoveWrapper, this, _1));
QTimer::singleShot(600, this, SLOT(sendJoin()));
m_timer->start(FRESHNESS * 2000);
+ disableTreeDisplay();
+ QTimer::singleShot(2200, this, SLOT(enableTreeDisplay()));
}
catch (Sync::CcnxOperationException ex)
{
@@ -621,6 +623,20 @@
fitView();
}
+void ChatDialog::enableTreeDisplay()
+{
+ treeButton->setEnabled(true);
+ treeViewer->show();
+ fitView();
+}
+
+void ChatDialog::disableTreeDisplay()
+{
+ treeButton->setEnabled(false);
+ treeViewer->hide();
+ fitView();
+}
+
void
ChatDialog::checkSetting()
{
@@ -679,6 +695,8 @@
m_sock = new Sync::SyncAppSocket(syncPrefix, bind(&ChatDialog::processTreeUpdateWrapper, this, _1, _2), bind(&ChatDialog::processRemoveWrapper, this, _1));
QTimer::singleShot(1000, this, SLOT(sendJoin()));
m_timer->start(FRESHNESS * 2000);
+ disableTreeDisplay();
+ QTimer::singleShot(2200, this, SLOT(enableTreeDisplay()));
}
catch (Sync::CcnxOperationException ex)
{
diff --git a/chatdialog.h b/chatdialog.h
index 75e5d97..7c366e5 100644
--- a/chatdialog.h
+++ b/chatdialog.h
@@ -58,6 +58,7 @@
void createActions();
QString formatTime(time_t);
void printTimeInCell(QTextTable *, time_t);
+ void disableTreeDisplay();
private slots:
void returnPressed();
@@ -70,6 +71,7 @@
void sendLeave();
void replot();
void updateRosterList(QStringList);
+ void enableTreeDisplay();
// icon related
void iconActivated(QSystemTrayIcon::ActivationReason reason);