reconnection issues
This commit is contained in:
parent
5f64321c2a
commit
3a120c773a
7 changed files with 67 additions and 30 deletions
|
@ -215,9 +215,8 @@ void Models::Item::_removeChild(int index)
|
|||
|
||||
void Models::Item::changed(int col)
|
||||
{
|
||||
if (parent != nullptr) {
|
||||
emit childChanged(this, row(), col);
|
||||
}
|
||||
|
||||
emit childChanged(this, row(), col);
|
||||
}
|
||||
|
||||
void Models::Item::toOfflineState()
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue