feat(train): a person's workouts opened with them (ADR 0030, D14, D15)
TrainPerson now opens the person's own sync database in their folder, halkyon_app's SyncService behind AppCompatibility (the module's basics' minimumAppBuild against the build package_info_plus reads), their key and their workouts, and closes them in that order, the key last. As in Learn, a person's data waits for the one before to close, since signing in again opens the same database. The pubspec's dependencies are sorted again (clock had gone before flutter). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
d1daec9c0b
commit
6171ff10a0
1 changed files with 143 additions and 17 deletions
|
|
@ -3,9 +3,14 @@ import 'package:halkyon_app/halkyon_app.dart';
|
|||
import 'package:halkyon_app/testing.dart';
|
||||
import 'package:halkyon_train_flutter/src/app/train_app.dart';
|
||||
import 'package:halkyon_train_flutter/src/app/train_dependencies.dart';
|
||||
import 'package:halkyon_train_flutter/src/core/privacy/train_keys.dart';
|
||||
import 'package:halkyon_train_flutter/src/feature/workout/data/workout_repository.dart';
|
||||
import 'package:halkyon_ui/halkyon_ui.dart';
|
||||
import 'package:material_ui/material_ui.dart';
|
||||
|
||||
import '../support/memory_content_key_gateway.dart';
|
||||
import '../support/memory_workout_gateway.dart';
|
||||
|
||||
void main() {
|
||||
final builtIn = Instance.parse('train.example.org')!;
|
||||
late MemoryInstanceStore store;
|
||||
|
|
@ -85,7 +90,17 @@ void main() {
|
|||
'https://code.halkyon.app/project-halkyon/halkyon',
|
||||
openPerson: (person) async {
|
||||
opened.add(person);
|
||||
return TrainPerson(person);
|
||||
return TrainPerson(
|
||||
person,
|
||||
workouts: WorkoutRepository(
|
||||
MemoryWorkoutGateway(),
|
||||
TrainKeys(
|
||||
MemoryContentKeyGateway(),
|
||||
FakeContentCipher(),
|
||||
() async => null,
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
|
|
|
|||
Loading…
Reference in a new issue