mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Fixed refill of the threads tree after receiving a new message.
Now the new message is expanded. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4245 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f1e96c839e
commit
a56ce1d5be
@ -491,6 +491,7 @@ static void CleanupItems (QList<QTreeWidgetItem *> &Items)
|
|||||||
delete (*Item);
|
delete (*Item);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Items.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ForumsDialog::forumInfoToGroupItemInfo(const ForumInfo &forumInfo, GroupItemInfo &groupItemInfo)
|
void ForumsDialog::forumInfoToGroupItemInfo(const ForumInfo &forumInfo, GroupItemInfo &groupItemInfo)
|
||||||
@ -585,6 +586,10 @@ void ForumsDialog::changedForum(const QString &id)
|
|||||||
|
|
||||||
void ForumsDialog::changedThread ()
|
void ForumsDialog::changedThread ()
|
||||||
{
|
{
|
||||||
|
if (fillThread) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* just grab the ids of the current item */
|
/* just grab the ids of the current item */
|
||||||
QTreeWidgetItem *curr = ui.threadTreeWidget->currentItem();
|
QTreeWidgetItem *curr = ui.threadTreeWidget->currentItem();
|
||||||
|
|
||||||
@ -718,13 +723,6 @@ void ForumsDialog::fillThreadFinished()
|
|||||||
|
|
||||||
// clear list
|
// clear list
|
||||||
fillThread->items.clear();
|
fillThread->items.clear();
|
||||||
|
|
||||||
QList<QTreeWidgetItem*>::iterator Item;
|
|
||||||
for (Item = fillThread->itemToExpand.begin(); Item != fillThread->itemToExpand.end(); Item++) {
|
|
||||||
if ((*Item)->isHidden() == false) {
|
|
||||||
(*Item)->setExpanded(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
FillThreads (fillThread->items, fillThread->expandNewMessages, fillThread->itemToExpand);
|
FillThreads (fillThread->items, fillThread->expandNewMessages, fillThread->itemToExpand);
|
||||||
|
|
||||||
@ -732,6 +730,12 @@ void ForumsDialog::fillThreadFinished()
|
|||||||
CleanupItems (fillThread->items);
|
CleanupItems (fillThread->items);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QList<QTreeWidgetItem*>::iterator Item;
|
||||||
|
for (Item = fillThread->itemToExpand.begin(); Item != fillThread->itemToExpand.end(); Item++) {
|
||||||
|
if ((*Item)->isHidden() == false) {
|
||||||
|
(*Item)->setExpanded(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
fillThread->itemToExpand.clear();
|
fillThread->itemToExpand.clear();
|
||||||
|
|
||||||
if (ui.filterPatternLineEdit->text().isEmpty() == false) {
|
if (ui.filterPatternLineEdit->text().isEmpty() == false) {
|
||||||
@ -808,7 +812,6 @@ void ForumsDialog::insertThreads()
|
|||||||
ui.forumName->setText(QString::fromStdWString(fi.forumName));
|
ui.forumName->setText(QString::fromStdWString(fi.forumName));
|
||||||
|
|
||||||
ui.progressBar->show();
|
ui.progressBar->show();
|
||||||
ui.threadTreeWidget->clear();
|
|
||||||
|
|
||||||
// create fill thread
|
// create fill thread
|
||||||
fillThread = new ForumsFillThread(this);
|
fillThread = new ForumsFillThread(this);
|
||||||
|
Loading…
Reference in New Issue
Block a user