V3-05: mounted (handlebar) mode
Wake lock via a WakelockController seam (mirrors LocationSource), gated strictly to actual recording and released on stop/discard/navigate-away/dispose. High-contrast ripprMountedTheme() applied only to the record screen. BigStat gained a scale param for the headline figure rather than a blanket TextTheme.apply, which crashes on Material 3's default theme.
This commit is contained in:
@@ -17,6 +17,7 @@ import '../domain/models.dart';
|
||||
import '../recording/geolocator_location_source.dart';
|
||||
import '../recording/location_source.dart';
|
||||
import '../recording/recording_engine.dart';
|
||||
import '../recording/wakelock_controller.dart';
|
||||
import '../telemetry/live_telemetry.dart';
|
||||
import '../telemetry/telemetry_uploader.dart';
|
||||
|
||||
@@ -111,6 +112,16 @@ final unitSystemProvider = StateProvider<UnitSystem>(
|
||||
(ref) => ref.watch(configProvider)?.unitSystem ?? UnitSystem.metric,
|
||||
);
|
||||
|
||||
/// V3-05: same seeded-then-directly-written shape as [mapEnabledProvider].
|
||||
final mountedModeProvider = StateProvider<bool>(
|
||||
(ref) => ref.watch(configProvider)?.mountedMode ?? false,
|
||||
);
|
||||
|
||||
/// Overridden in tests with [FakeWakelockController].
|
||||
final wakelockControllerProvider = Provider<WakelockController>(
|
||||
(ref) => PlusWakelockController(),
|
||||
);
|
||||
|
||||
/// Live path for the recording screen's map (V3-04). `.family` + `autoDispose` so the
|
||||
/// stream tears down the moment the record screen stops watching it — no leftover
|
||||
/// subscription ticking away once a ride ends or the map toggle goes off.
|
||||
|
||||
Reference in New Issue
Block a user