Until now, connection state was managed in VncClient. This was fine before
introduction of SSH Tunnel, but now, state in VncClient may not fully reflect
the state transitions. Moreover, most of the time we simply check whether
we are connected or not.
Now, simple boolean state is managed by VncClient, and more granular state
is managed by VncViewModel.
- Reimplemented from scratch, less hacky
- Preference change no longer requires app restart to take effect
- Moved the preference to Discovery section to provide more context
Instead of having different (and confusing) timeouts/restart settings, we now have
a single 'Autorun' mode. When enabled, we keep discovering servers as long as
HomeActivity is in foreground, and automatically stop in background.
So discovered servers won't become stale after timeout.
To activate it, disable "Settings => Input => Gestures => Direct touch".
When active, swipe gesture moves the pointer,
and all actions happen at pointer position.
Mouse and stylus devices are NOT affected.
Translated using Weblate (Portuguese (Brazil))
Translated using Weblate (French)
Translated using Weblate (Norwegian Bokmål)
Translated using Weblate (Persian)
Added new language using Weblate (Russian)
Added new language using Weblate (Serbian)
Co-authored-by: J. Lavoie <j.lavoie@net-c.ca>
Co-authored-by: Gaurav Ujjwal <gujjwal00@gmail.com>
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Co-authored-by: Eshagh Shahedany <eshagh094@gmail.com>
Co-authored-by: Artem <Localizer_in_Russian@protonmail.com>
Co-authored-by: Саша Петровић <salepetronije@gmail.com>
We can now receive Meta key events, and other shortcuts like Alt+Tab.
Standard AOSP has no way to capture these, but it seems Samsung DeX
has a (secret?) method, which allows apps to request these events.
Fixes#37
During a recent profiling session, I noticed that we were generating a lot of
`Float` objects during event processing. This was due the way Kotlin implements
lambda return type, as implementation of generic `Function` interface. This
causes auto-boxing of dx & dy parameters for swipe actions.
Now we use an explicit functional interface for efficient code generation.
Delegating to lazy properties has no benefit here. It was originally intended to
speedup Dispatcher construction, by reducing allocation & avoiding prefs lookup.
But Lazy objects themselves have to be allocated, and we have to do an extra
indirection to retrieve actual values later. So, it was a pre-mature optimization,
entirely unnecessary here.
Currently translated at 65.5% (101 of 154 strings)
Added translation using Weblate (Norwegian Bokmål)
Co-authored-by: Allan Nordhøy <epost@anotheragency.no>
Translate-URL: https://hosted.weblate.org/projects/avnc/app/nb_NO/
Translation: AVNC/App
- Re-organized code fragments for better readability & locality.
- Instead of having multiple gesture *End() functions, we now have a general
solution to end gestures, by automatically releasing mouse buttons.
- Simplify 'Hover' event handling.
- Move FrameScroller to VncViewModel
Previously, onGenericMotionEvent only passed events to handleMouseEvent.
Stylus hover events, however, also trigger onGenericMotionEvent, so it
needs to handle stylus events, too.
New implementation has couple of benefits:
- Handles character key press while accent key is still down
- Better handling of intermixed character/accent key events