mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Don't spam logs if there are no dbus
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user