45294ade31
On shell mount, reads the IANA timezone from the device via flutter_timezone and POSTs it to PUT /api/settings as user_timezone. Mirrors the web app's App.vue behaviour so briefing events and the chat route use the correct local time on Android. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
14 lines
267 B
Dart
14 lines
267 B
Dart
import 'package:dio/dio.dart';
|
|
|
|
class SettingsApi {
|
|
const SettingsApi(this._dio);
|
|
final Dio _dio;
|
|
|
|
Future<void> syncTimezone(String ianaTimezone) async {
|
|
await _dio.put<void>(
|
|
'/api/settings',
|
|
data: {'user_timezone': ianaTimezone},
|
|
);
|
|
}
|
|
}
|