Do not show restriction date when restricted forever

This commit is contained in:
Eric Kotato 2019-10-02 17:16:30 +03:00
parent cce1c7665b
commit 9bacf99a92

View file

@ -757,7 +757,7 @@ std::optional<QString> RestrictionError(
const auto channel = peer->asChannel();
if (!all && channel) {
auto restrictedUntil = channel->restrictedUntil();
if (restrictedUntil > 0) {
if (restrictedUntil > 0 && !ChannelData::IsRestrictedForever(restrictedUntil)) {
auto restrictedUntilDateTime = base::unixtime::parse(channel->restrictedUntil());
auto date = restrictedUntilDateTime.toString(qsl("d.MM.yy"));
auto time = restrictedUntilDateTime.toString(cTimeFormat());