mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-23 06:31:20 -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
|
@ -37,6 +37,7 @@
|
|||
#include "RetroShareLink.h"
|
||||
#include "MainWindow.h"
|
||||
#include "gui/gxsforums/GxsForumsDialog.h"
|
||||
#include "gui/gxschannels/GxsChannelDialog.h"
|
||||
#include "SearchDialog.h"
|
||||
#include "msgs/MessageComposer.h"
|
||||
#include "util/misc.h"
|
||||
|
@ -1205,14 +1206,13 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
|||
std::cerr << " RetroShareLink::process ForumRequest : name : " << link.name().toStdString() << ". id : " << link.hash().toStdString() << ". msgId : " << link.msgId().toStdString() << std::endl;
|
||||
#endif
|
||||
|
||||
|
||||
MainWindow::showWindow(MainWindow::Forums);
|
||||
GxsForumsDialog *forumsDialog = dynamic_cast<GxsForumsDialog*>(MainWindow::getPage(MainWindow::Forums));
|
||||
MainWindow::showWindow(MainWindow::Forums);
|
||||
GxsForumsDialog *forumsDialog = dynamic_cast<GxsForumsDialog*>(MainWindow::getPage(MainWindow::Forums));
|
||||
if (!forumsDialog) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (forumsDialog->navigate(RsGxsGroupId(link.id().toStdString()), RsGxsMessageId(link.msgId().toStdString()))) {
|
||||
if (forumsDialog->navigate(RsGxsGroupId(link.id().toStdString()), RsGxsMessageId(link.msgId().toStdString()))) {
|
||||
if (link.msgId().isEmpty()) {
|
||||
forumFound.append(link.name());
|
||||
} else {
|
||||
|
@ -1227,38 +1227,19 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
|||
}
|
||||
break;
|
||||
}
|
||||
#if 0
|
||||
case TYPE_CHANNEL:
|
||||
{
|
||||
#ifdef DEBUG_RSLINK
|
||||
std::cerr << " RetroShareLink::process ChannelRequest : name : " << link.name().toStdString() << ". id : " << link.hash().toStdString() << ". msgId : " << link.msgId().toStdString() << std::endl;
|
||||
#endif
|
||||
|
||||
ChannelInfo ci;
|
||||
if (!rsChannels->getChannelInfo(link.id().toStdString(), ci)) {
|
||||
if (link.msgId().isEmpty()) {
|
||||
channelUnknown.append(link.name());
|
||||
} else {
|
||||
channelMsgUnknown.append(link.name());
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
ChannelMsgInfo msg;
|
||||
if (!link.msgId().isEmpty()) {
|
||||
if (!rsChannels->getChannelMessage(ci.channelId, link.msgId().toStdString(), msg)) {
|
||||
channelMsgUnknown.append(link.name());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
MainWindow::showWindow(MainWindow::Channels);
|
||||
ChannelFeed *channelFeed = dynamic_cast<ChannelFeed*>(MainWindow::getPage(MainWindow::Channels));
|
||||
if (!channelFeed) {
|
||||
GxsChannelDialog *channelDialog = dynamic_cast<GxsChannelDialog*>(MainWindow::getPage(MainWindow::Channels));
|
||||
if (!channelDialog) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (channelFeed->navigate(ci.channelId, msg.msgId)) {
|
||||
if (channelDialog->navigate(RsGxsGroupId(link.id().toStdString()), RsGxsMessageId(link.msgId().toStdString()))) {
|
||||
if (link.msgId().isEmpty()) {
|
||||
channelFound.append(link.name());
|
||||
} else {
|
||||
|
@ -1273,7 +1254,6 @@ static void processList(const QStringList &list, const QString &textSingular, co
|
|||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case TYPE_SEARCH:
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue