mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-15 21:57:10 +02:00
Fix mute value casting.
This commit is contained in:
parent
644ec1f599
commit
ca460dab6d
1 changed files with 4 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue