mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 08:26:11 +00:00
electron_bridge: Use getter and setter interface to mutable properties.
This exists in all versions of the desktop app that we still support, and will eventually let us delete a bit of annoying compatibility code from the desktop app’s injected JavaScript. Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
This commit is contained in:
committed by
Tim Abbott
parent
25c5856988
commit
e701f20861
@@ -272,11 +272,11 @@ exports.compute_active_status = function () {
|
||||
// * For the electron desktop app, we also know whether the
|
||||
// user is active or idle elsewhere on their system.
|
||||
//
|
||||
// The check for `idle_on_system === undefined` is feature
|
||||
// The check for `get_idle_on_system === undefined` is feature
|
||||
// detection; older desktop app releases never set that property.
|
||||
if (window.electron_bridge !== undefined
|
||||
&& window.electron_bridge.idle_on_system !== undefined) {
|
||||
if (window.electron_bridge.idle_on_system) {
|
||||
&& window.electron_bridge.get_idle_on_system !== undefined) {
|
||||
if (window.electron_bridge.get_idle_on_system()) {
|
||||
return exports.IDLE;
|
||||
}
|
||||
return exports.ACTIVE;
|
||||
|
||||
Reference in New Issue
Block a user