2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Added ability to set emoji status for certain period of time.

This commit is contained in:
23rd
2022-09-01 22:24:46 +03:00
committed by John Preston
parent 9bb2bb09b9
commit fa4801ac94
10 changed files with 166 additions and 47 deletions

View File

@@ -24,6 +24,27 @@ constexpr auto kMinYScale = 0.2;
} // namespace
std::vector<TimeId> DefaultTimePickerValues() {
return {
(60 * 15),
(60 * 30),
(3600 * 1),
(3600 * 2),
(3600 * 3),
(3600 * 4),
(3600 * 8),
(3600 * 12),
(86400 * 1),
(86400 * 2),
(86400 * 3),
(86400 * 7 * 1),
(86400 * 7 * 2),
(86400 * 31 * 1),
(86400 * 31 * 2),
(86400 * 31 * 3),
};
}
Fn<TimeId()> TimePickerBox(
not_null<GenericBox*> box,
std::vector<TimeId> values,

View File

@@ -11,7 +11,9 @@ namespace Ui {
class GenericBox;
Fn<TimeId()> TimePickerBox(
[[nodiscard]] std::vector<TimeId> DefaultTimePickerValues();
[[nodiscard]] Fn<TimeId()> TimePickerBox(
not_null<GenericBox*> box,
std::vector<TimeId> values,
std::vector<QString> phrases,