| 70 | } |
| 71 | |
| 72 | std::optional<QString> OnlineTextCommon(LastseenStatus status, TimeId now) { |
| 73 | if (status.isOnline(now)) { |
| 74 | return tr::lng_status_online(tr::now); |
| 75 | } else if (status.isLongAgo()) { |
| 76 | return tr::lng_status_offline(tr::now); |
| 77 | } else if (status.isRecently()) { |
| 78 | return tr::lng_status_recently(tr::now); |
| 79 | } else if (status.isWithinWeek()) { |
| 80 | return tr::lng_status_last_week(tr::now); |
| 81 | } else if (status.isWithinMonth()) { |
| 82 | return tr::lng_status_last_month(tr::now); |
| 83 | } else if (status.isHidden()) { |
| 84 | return tr::lng_status_recently(tr::now); |
| 85 | } |
| 86 | return std::nullopt; |
| 87 | } |
| 88 | |
| 89 | [[nodiscard]] int UniqueReactionsLimit(not_null<Main::AppConfig*> config) { |
| 90 | return config->get<int>("reactions_uniq_max", 11); |
no test coverage detected