mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 20:48:52 +03:00
Fix overflow in event expiration days
This commit is contained in:
parent
d81b14b77b
commit
146086332b
1 changed files with 3 additions and 3 deletions
|
@ -90,7 +90,7 @@ void
|
||||||
EventExpiry::setExpireEventsAfterDays(int val)
|
EventExpiry::setExpireEventsAfterDays(int val)
|
||||||
{
|
{
|
||||||
if (val > 0)
|
if (val > 0)
|
||||||
this->event.expire_after_ms = val * (1000 * 60 * 60 * 24);
|
this->event.expire_after_ms = std::uint64_t(val) * (1000 * 60 * 60 * 24);
|
||||||
else
|
else
|
||||||
this->event.expire_after_ms = 0;
|
this->event.expire_after_ms = 0;
|
||||||
emit expireEventsAfterDaysChanged();
|
emit expireEventsAfterDaysChanged();
|
||||||
|
@ -100,7 +100,7 @@ void
|
||||||
EventExpiry::setProtectLatestEvents(int val)
|
EventExpiry::setProtectLatestEvents(int val)
|
||||||
{
|
{
|
||||||
if (val > 0)
|
if (val > 0)
|
||||||
this->event.protect_latest = val;
|
this->event.protect_latest = std::uint64_t(val);
|
||||||
else
|
else
|
||||||
this->event.expire_after_ms = 0;
|
this->event.expire_after_ms = 0;
|
||||||
emit protectLatestEventsChanged();
|
emit protectLatestEventsChanged();
|
||||||
|
@ -110,7 +110,7 @@ void
|
||||||
EventExpiry::setExpireEventsAfterCount(int val)
|
EventExpiry::setExpireEventsAfterCount(int val)
|
||||||
{
|
{
|
||||||
if (val > 0)
|
if (val > 0)
|
||||||
this->event.keep_only_latest = val;
|
this->event.keep_only_latest = std::uint64_t(val);
|
||||||
else
|
else
|
||||||
this->event.keep_only_latest = 0;
|
this->event.keep_only_latest = 0;
|
||||||
emit expireEventsAfterCountChanged();
|
emit expireEventsAfterCountChanged();
|
||||||
|
|
Loading…
Reference in a new issue