reconnection issues

This commit is contained in:
Blue 2020-08-08 02:33:03 +03:00
parent 5f64321c2a
commit 3a120c773a
7 changed files with 67 additions and 30 deletions

View file

@ -54,6 +54,8 @@ Conversation::Conversation(bool muc, Models::Account* acc, const QString pJid, c
{
m_ui->setupUi(this);
connect(acc, &Models::Account::childChanged, this, &Conversation::onAccountChanged);
filesLayout = new FlowLayout(m_ui->filesPanel, 0);
m_ui->filesPanel->setLayout(filesLayout);
@ -121,6 +123,20 @@ Conversation::~Conversation()
{
}
void Conversation::onAccountChanged(Models::Item* item, int row, int col)
{
if (item == account) {
if (col == 2 && account->getState() == Shared::ConnectionState::connected) {
if (!requestingHistory) {
requestingHistory = true;
line->showBusyIndicator();
emit requestArchive("");
scroll = down;
}
}
}
}
void Conversation::applyVisualEffects()
{
DropShadowEffect *e1 = new DropShadowEffect;

View file

@ -121,6 +121,7 @@ protected slots:
void onBadgeClose();
void onClearButton();
void onTextEditDocSizeChanged(const QSizeF& size);
void onAccountChanged(Models::Item* item, int row, int col);
public:
const bool isMuc;