feat: sync device timezone to backend on startup
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>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
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},
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user