Record screen: LIVE + SMS as square buttons bottom-left; toggle live on the fly

- move the SMS button out of the bottom panel into a left-hand square-button group
  (bottom-left, opposite the right control stack), add a LIVE toggle next to it
- LIVE turns location sharing on/off right from the record screen, even if it was
  never enabled in the profile; warns if the token is still unset
- LiveShare re-reads its config every tick so the toggle takes effect within ~10s
This commit is contained in:
4aiman 2026-10-26 19:13:34 +03:00
commit c70cc1e4a4
3 changed files with 40 additions and 8 deletions

View file

@ -47,7 +47,8 @@ object LiveShare {
// Latest fix from the GPS flush loop (every ~10s). Non-blocking: the network call runs on a
// throwaway thread so it never stalls the main looper that drives GPS delivery.
fun tick(ctx: Context, lat: Double, lon: Double, speed: Float, fixTs: Long) {
if (!loaded) readCfg(ctx)
// re-read every tick so toggling the record-screen LIVE button takes effect within ~10s
readCfg(ctx)
if (!enabled || url.isBlank() || token.isBlank()) return
if (lat == 0.0 && lon == 0.0) return // no fix yet
val now = System.currentTimeMillis()