mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-08 00:55:13 -04:00
Fixed navigate to forum and channel group when clicking a forum/channel link.
Navigate to post/message is still a todo. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7638 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
929599ad7f
commit
392159ae4b
3 changed files with 44 additions and 40 deletions
|
@ -471,23 +471,36 @@ void GxsGroupFrameDialog::loadComment(const RsGxsGroupId &grpId, const RsGxsMess
|
|||
ui->messageTabWidget->setCurrentWidget(commentDialog);
|
||||
}
|
||||
|
||||
bool GxsGroupFrameDialog::navigate(const RsGxsGroupId groupId, const RsGxsMessageId& msgId)
|
||||
bool GxsGroupFrameDialog::navigate(const RsGxsGroupId &groupId, const RsGxsMessageId& msgId)
|
||||
{
|
||||
if (groupId.isNull()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (ui->groupTreeWidget->activateId(QString::fromStdString(groupId.toStdString()), msgId.isNull()) == NULL) {
|
||||
return false;
|
||||
}
|
||||
// if (mGroupId == groupId) {
|
||||
// return false;
|
||||
// }
|
||||
//
|
||||
// if (msgId.isNull()) {
|
||||
// return true;
|
||||
// }
|
||||
if (mStateHelper->isLoading(TOKEN_TYPE_GROUP_SUMMARY)) {
|
||||
mNavigatePendingGroupId = groupId;
|
||||
mNavigatePendingMsgId = msgId;
|
||||
|
||||
/* No information if group is available */
|
||||
return true;
|
||||
}
|
||||
|
||||
QString groupIdString = QString::fromStdString(groupId.toStdString());
|
||||
if (ui->groupTreeWidget->activateId(groupIdString, msgId.isNull()) == NULL) {
|
||||
return false;
|
||||
}
|
||||
|
||||
changedGroup(groupIdString);
|
||||
|
||||
/* search exisiting tab */
|
||||
GxsMessageFrameWidget *msgWidget = messageWidget(mGroupId, false);
|
||||
if (!msgWidget) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (msgId.isNull()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
//#TODO
|
||||
// if (mThreadLoading) {
|
||||
|
@ -508,7 +521,7 @@ bool GxsGroupFrameDialog::navigate(const RsGxsGroupId groupId, const RsGxsMessag
|
|||
// }
|
||||
// }
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
GxsMessageFrameWidget *GxsGroupFrameDialog::messageWidget(const RsGxsGroupId &groupId, bool ownTab)
|
||||
|
@ -820,6 +833,14 @@ void GxsGroupFrameDialog::loadGroupSummary(const uint32_t &token)
|
|||
if (userdata) {
|
||||
delete(userdata);
|
||||
}
|
||||
|
||||
if (!mNavigatePendingGroupId.isNull()) {
|
||||
/* Navigate pending */
|
||||
navigate(mNavigatePendingGroupId, mNavigatePendingMsgId);
|
||||
|
||||
mNavigatePendingGroupId.clear();
|
||||
mNavigatePendingMsgId.clear();
|
||||
}
|
||||
}
|
||||
|
||||
/*********************** **** **** **** ***********************/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue