Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Resolves issue with timing out when Rocket.Chat is in the background … #1264

Merged
merged 3 commits into from
Jul 14, 2019

Conversation

ChristineBoersen
Copy link
Contributor

@RocketChat/electron

Closes #1260

Resolves issue with Rocket.Chat client going to away when in the background. Solved it by explicitly setting the awayOnWindowBlur: false instead of relying on the default value

Also, shortened the idleTimeDetectionInterval to 5000 ms. The original value was 1/2 of the idleTimeLimit, which is way too long to change state (e.g. the default of 300 would only check every 150 seconds!)

…by explicitly setting the awayOnWindowBlur: false instead of relying on the default value

Also, shortened the idleTimeDetectionInterval to 5000 ms. The original value was 1/2 of the idleTimeLimit, which is way too long to change state (e.g. the default of 300 would only check every 150 seconds!
…ket.Chat being focused, work consistently.

This may be too spammy @ 5 seconds, but trigger online/away every time (vs using the cached value) was the only way I could get it consistent.
@ChristineBoersen
Copy link
Contributor Author

Just to add, this was only tested on a Windows 10 environment,

@tassoevan
Copy link
Collaborator

@ChristineBoersen Do you think it's okay for users to have two away detection policies? I mean, one for browser client (default of 300s) and another one for the desktop client (5s)?

@ChristineBoersen
Copy link
Contributor Author

ChristineBoersen commented Jun 27, 2019 via email

@tassoevan
Copy link
Collaborator

@ChristineBoersen While I agree that both would be shorter, the 300s threshold exist because away detection is more complicated on the browser environment -- that's why awayOnWindowBlur is a thing. With that being said, I'm convinced that it's hurting users to share the same preference and this PR is welcome in the next release.

@ChristineBoersen
Copy link
Contributor Author

I agree (and after looking at how the browser side handles it agree it should be left alone for now) that the browser side is much more complicated since it can't call any OS hooks to truly know away/online

@vinceogne
Copy link

vinceogne commented Oct 30, 2019

is this fixed in the currently available 2.16.0 dmg/exe files? i tried them but it looks like the electron clients are still going idle/away if they are not in focus.

@ChristineBoersen
Copy link
Contributor Author

This fix would have only helped Windows. I know it was in the 2.15.5 version.

@vinceogne
Copy link

I tried Windows and Mac with version 2.16.0 and they both have the same issue. 2.15.5 seems to work fine for both.

@ChristineBoersen
Copy link
Contributor Author

Unfortunately, all I did was donate the patch which was part of 2.15.5. My hands are out of the Rocket.Chat project at this point for other reasons...

@tassoevan Any idea on the regression issue?

@tassoevan
Copy link
Collaborator

Version 2.16.0 landed with the bug described on #1364 and fixed by #1365, but a new patch release is blocked by problematic a behavior on auto-update for Windows users. I believe the most appealing alternative right now is not publish it for Windows users while update is failing.

@vinceogne
Copy link

any update on how to fix electron from changing to 'away' when in the background? i've been stuck on 2.15.5 since it seems to be the last version where it worked correctly. I just installed 2.17.8 and my status changes to away while still actively using other programs (osx 10.14.6)

@Nihixi
Copy link

Nihixi commented Aug 6, 2020

version 2.17.7 also does not handle the status correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auto-Away on Windows 10 does not follow user's machine activity
4 participants