2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Removed "Show restriction date" because it's official now

This commit is contained in:
RadRussianRus
2019-10-07 18:33:01 +03:00
parent ef37355fda
commit 4c99b13c91
2 changed files with 0 additions and 38 deletions

View File

@@ -2238,13 +2238,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
"ktg_pinned_message_show" = "Show pinned message";
"ktg_pinned_message_hide" = "Hide pinned message";
"ktg_restricted_send_message_until" = "The admins of this group restricted you from writing here until {date}, {time}.";
"ktg_restricted_send_media_until" = "The admins of this group restricted you from posting media content here until {date}, {time}.";
"ktg_restricted_send_stickers_until" = "The admins of this group restricted you from posting stickers here until {date}, {time}.";
"ktg_restricted_send_gifs_until" = "The admins of this group restricted you from posting GIFs here until {date}, {time}.";
"ktg_restricted_send_inline_until" = "The admins of this group restricted you from posting inline content here until {date}, {time}.";
"ktg_restricted_send_polls_until" = "The admins of this group restricted you from posting polls here until {date}, {time}.";
"ktg_settings_show_json_settings" = "Show custom settings";
"ktg_settings_restart" = "Restart Kotatogram";

View File

@@ -757,37 +757,6 @@ std::optional<QString> RestrictionError(
using Flag = ChatRestriction;
if (const auto restricted = peer->amRestricted(restriction)) {
const auto all = restricted.isWithEveryone();
const auto channel = peer->asChannel();
if (!all && channel) {
auto restrictedUntil = channel->restrictedUntil();
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());
switch (restriction) {
case Flag::f_send_polls:
return tr::ktg_restricted_send_polls_until(
tr::now, lt_date, date, lt_time, time);
case Flag::f_send_messages:
return tr::ktg_restricted_send_message_until(
tr::now, lt_date, date, lt_time, time);
case Flag::f_send_media:
return tr::ktg_restricted_send_media_until(
tr::now, lt_date, date, lt_time, time);
case Flag::f_send_stickers:
return tr::ktg_restricted_send_stickers_until(
tr::now, lt_date, date, lt_time, time);
case Flag::f_send_gifs:
return tr::ktg_restricted_send_gifs_until(
tr::now, lt_date, date, lt_time, time);
case Flag::f_send_inline:
case Flag::f_send_games:
return tr::ktg_restricted_send_inline_until(
tr::now, lt_date, date, lt_time, time);
}
}
}
switch (restriction) {
case Flag::f_send_polls:
return all