mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-08-31 22:55:11 +00:00
Fix mute value casting.
This commit is contained in:
@@ -54,10 +54,12 @@ namespace {
|
|||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
int MuteValue::until() const {
|
int MuteValue::until() const {
|
||||||
|
constexpr auto kMax = std::numeric_limits<int>::max();
|
||||||
|
|
||||||
return forever
|
return forever
|
||||||
? std::numeric_limits<int>::max()
|
? kMax
|
||||||
: (period > 0)
|
: (period > 0)
|
||||||
? (base::unixtime::now() + period)
|
? int(std::min(int64(base::unixtime::now()) + period, int64(kMax)))
|
||||||
: unmute
|
: unmute
|
||||||
? 0
|
? 0
|
||||||
: -1;
|
: -1;
|
||||||
|
Reference in New Issue
Block a user