paper-plane
paper-plane copied to clipboard
Change user status to offline when mouse and keyboard inactivity is detected
In Telegram Desktop, when the user's mouse and keyboard are inactive for more than 30 seconds, the client is set to "offline".
As the project is also intended for mobile devices: In Telegram Android, this behavior does not happen and the client remains "online" until the screen is locked. I think this behavior is different from Telegram Desktop because most Android devices use low screen timeouts (30s or 1 min) compared to desktop PCs. So maybe we could detect whether the device is a mobile device and change this behavior accordingly?
So maybe we could detect whether the device is a mobile device and change this behavior accordingly?
I think this would be unnecessary complexity. Partly because of convergence scenarios (phone plugged in to a monitor and used as a PC), but also because I don't see any issue with Telegrand marking the user as offline if they don't interact with Telegrand on their phone. It's understandable Telegram Android doesn't bother with this, but Telegrand needs to bother with it regardless, so I think it's fine to always have it like that.