fixed text and condition for post sync warning

This commit is contained in:
csoler 2020-11-02 18:23:50 +01:00
parent 5efe472055
commit de2499ce6e
2 changed files with 8 additions and 4 deletions

View File

@ -877,8 +877,10 @@ void PostedListWidgetWithModel::insertBoardDetails(const RsPostedGroup& group)
sync_string = tr("Unknown");
}
if(group.mMeta.mLastPost > 0 && group.mMeta.mLastPost + rsPosted->getSyncPeriod(group.mMeta.mGroupId) < time(NULL) && IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags))
sync_string += " (Warning: will not allow latest posts to sync)";
auto sync_period = rsPosted->getSyncPeriod(group.mMeta.mGroupId) ;
if(sync_period > 0 && group.mMeta.mLastPost > 0 && group.mMeta.mLastPost + sync_period < time(NULL) && IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags))
sync_string += " (Warning: will not allow posts to sync)";
ui->syncPeriodLabel->setText(sync_string);

View File

@ -1093,8 +1093,10 @@ void GxsChannelPostsWidgetWithModel::insertChannelDetails(const RsGxsChannelGrou
sync_string = tr("Unknown");
}
if(group.mMeta.mLastPost > 0 && group.mMeta.mLastPost + rsGxsChannels->getSyncPeriod(group.mMeta.mGroupId) < time(NULL) && IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags))
sync_string += " (Warning: will not allow latest posts to sync)";
auto sync_period = rsGxsChannels->getSyncPeriod(group.mMeta.mGroupId) ;
if(sync_period > 0 && group.mMeta.mLastPost > 0 && group.mMeta.mLastPost + rsGxsChannels->getSyncPeriod(group.mMeta.mGroupId) < time(NULL) && IS_GROUP_SUBSCRIBED(group.mMeta.mSubscribeFlags))
sync_string += " (Warning: will not allow posts to sync)";
ui->infoSyncTimeLabel->setText(sync_string);