mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-12-17 17:43:59 -05:00
multiple improvements in distant channel search and general display of distant search results
This commit is contained in:
parent
500f572b98
commit
ba486a0029
11 changed files with 47 additions and 27 deletions
|
|
@ -538,23 +538,20 @@ void GxsChannelPostsWidgetWithModel::updateGroupData()
|
|||
|
||||
RsThread::async([this]()
|
||||
{
|
||||
RsGxsChannelGroup group;
|
||||
std::vector<RsGxsChannelGroup> groups;
|
||||
|
||||
if(!rsGxsChannels->getChannelsInfo(std::list<RsGxsGroupId>{ groupId() }, groups))
|
||||
if(rsGxsChannels->getChannelsInfo(std::list<RsGxsGroupId>{ groupId() }, groups) && groups.size()==1)
|
||||
group = groups[0];
|
||||
else if(!rsGxsChannels->getDistantSearchResultGroupData(groupId(),group))
|
||||
{
|
||||
std::cerr << __PRETTY_FUNCTION__ << " failed to get autodownload value for channel: " << groupId() << std::endl;
|
||||
std::cerr << __PRETTY_FUNCTION__ << " failed to get group data for channel: " << groupId() << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
if(groups.size() != 1)
|
||||
{
|
||||
RsErr() << __PRETTY_FUNCTION__ << " cannot retrieve channel data for group ID " << groupId() << ": ERROR." << std::endl;
|
||||
return;
|
||||
}
|
||||
|
||||
RsQThreadUtils::postToObject( [this,groups]()
|
||||
RsQThreadUtils::postToObject( [this,group]()
|
||||
{
|
||||
mGroup = groups[0];
|
||||
mGroup = group;
|
||||
mChannelPostsModel->updateChannel(groupId());
|
||||
|
||||
insertChannelDetails(mGroup);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue