void GxsChannelDialog::selectChannel(const QString &id) { mChannelId = id.toStdString(); bool autoDl = rsGxsChannels->getChannelAutoDownload(mChannelId); setAutoDownloadButton(autoDl); requestGroupData(mChannelId); requestPosts(mChannelId); }
void ChannelFeed::selectChannel(const QString &id) { mChannelId = id.toStdString(); bool autoDl = false; rsChannels->channelGetAutoDl(mChannelId, autoDl); setAutoDownloadButton(autoDl); updateChannelMsgs(); }
void GxsChannelDialog::toggleAutoDownload() { if (mChannelId.empty()) return; bool autoDl = rsGxsChannels->getChannelAutoDownload(mChannelId); if (rsGxsChannels->setChannelAutoDownload(mChannelId, !autoDl)) { setAutoDownloadButton(!autoDl); } else { std::cerr << "GxsChannelDialog::toggleAutoDownload() Auto Download failed to set"; std::cerr << std::endl; } }
void ChannelFeed::toggleAutoDownload(){ if(mChannelId.empty()) return; bool autoDl = true; if(rsChannels->channelGetAutoDl(mChannelId, autoDl)){ // if auto dl is set true, then set false if(autoDl){ rsChannels->channelSetAutoDl(mChannelId, false); }else{ rsChannels->channelSetAutoDl(mChannelId, true); } setAutoDownloadButton(!autoDl); } else{ std::cerr << "Auto Download failed to set" << std::endl; } }