mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Refactored checking of last input while notifications are displayed.
- Removed condition for Windows platform only. - Added smooth hiding of notifications in case video is watched or voice message is recorded. - psUserActionDone() was completely replaced with Core::App().updateNonIdle().
This commit is contained in:
@@ -128,17 +128,6 @@ namespace {
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
||||
crl::time _lastUserAction = 0;
|
||||
|
||||
} // namespace
|
||||
|
||||
void psUserActionDone() {
|
||||
_lastUserAction = crl::now();
|
||||
EventFilter::getInstance()->setSessionLoggedOff(false);
|
||||
}
|
||||
|
||||
bool psIdleSupported() {
|
||||
LASTINPUTINFO lii;
|
||||
lii.cbSize = sizeof(LASTINPUTINFO);
|
||||
@@ -347,7 +336,7 @@ QString CurrentExecutablePath(int argc, char *argv[]) {
|
||||
crl::time LastUserInputTime() {
|
||||
LASTINPUTINFO lii;
|
||||
lii.cbSize = sizeof(LASTINPUTINFO);
|
||||
return GetLastInputInfo(&lii) ? (crl::now() + lii.dwTime - GetTickCount()) : _lastUserAction;
|
||||
return GetLastInputInfo(&lii) ? (crl::now() + lii.dwTime - GetTickCount()) : 0LL;
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
Reference in New Issue
Block a user