2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-30 22:25:12 +00:00

Fix mute value casting.

This commit is contained in:
John Preston
2022-11-04 17:18:46 +04:00
parent 644ec1f599
commit ca460dab6d

View File

@@ -54,10 +54,12 @@ namespace {
} // namespace
int MuteValue::until() const {
constexpr auto kMax = std::numeric_limits<int>::max();
return forever
? std::numeric_limits<int>::max()
? kMax
: (period > 0)
? (base::unixtime::now() + period)
? int(std::min(int64(base::unixtime::now()) + period, int64(kMax)))
: unmute
? 0
: -1;