A new install asks first which instance to keep the person's studysets on, as Mastodon's apps do: an address, checked to answer as an instance of Halkyon Learn, or the build's own (learn.halkyon.eu) in one tap. Nothing is made anywhere before that, not even an anonymous account. An install from before goes on with the build's instance without asking. As Moshidon does, the device keeps an account on each instance it was used with, each signed in with its own folder and session, one in use at a time. Settings › Switch account lists them: another one switches at once, anonymous accounts included; Add account chooses another instance; removing one not in use deletes what the device holds of it. Signing out ends only the account in use. The build's own instance keeps its data where installs kept it before (`people/`, Serverpod's own session key), so they keep everything; other instances get folders and keys of their own. What the device shares across instances (its settings, sounds, the Pomodoro timer's place in the system) is made once and outlives every switch. The F-Droid listing drops TetheredNet: the app is no longer tied to the project's instance. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MMm7usAo6q9ZZRoPkWjoxi Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
15 lines
524 B
Dart
15 lines
524 B
Dart
import 'package:halkyon_learn_flutter/src/core/instance/instance.dart';
|
|
import 'package:halkyon_learn_flutter/src/core/instance/instance_checker.dart';
|
|
|
|
/// Says that the instances in [answering] answer, and no others.
|
|
class FakeInstanceChecker([final Set<Instance> answering = const {}])
|
|
implements InstanceChecker {
|
|
/// The instances asked, in order.
|
|
final asked = <Instance>[];
|
|
|
|
@override
|
|
Future<bool> answers(Instance instance) async {
|
|
asked.add(instance);
|
|
return answering.contains(instance);
|
|
}
|
|
}
|