mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Don't spam logs if there are no dbus
This commit is contained in:
parent
c12356a032
commit
1504136828
1 changed files with 6 additions and 1 deletions
|
@ -479,12 +479,17 @@ std::optional<crl::time> LastUserInputTime() {
|
|||
QDBusError::NotSupported,
|
||||
};
|
||||
|
||||
const auto notSupportedErrorsToLog = {
|
||||
QDBusError::Disconnected,
|
||||
QDBusError::AccessDenied,
|
||||
};
|
||||
|
||||
if (reply.isValid()) {
|
||||
return (crl::now() - static_cast<crl::time>(reply.value()));
|
||||
} else if (ranges::contains(notSupportedErrors, reply.error().type())) {
|
||||
NotSupported = true;
|
||||
} else {
|
||||
if (reply.error().type() == QDBusError::AccessDenied) {
|
||||
if (ranges::contains(notSupportedErrorsToLog, reply.error().type())) {
|
||||
NotSupported = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue