Introduces shared seams for paginated views, D-pad reorder, media control routing, async singletons and the device method channel, then points the open-coded copies at them. Also removes unused models and duplicated provider/server plumbing, folds the twice-implemented artifact store in the server, and factors the repeated Flutter toolchain prologue in CI into a composite action.
15 lines
769 B
Dart
15 lines
769 B
Dart
import '../services/settings_service.dart';
|
|
import 'active_profile_provider.dart';
|
|
|
|
extension ProfileSelectionPolicy on ActiveProfileProvider {
|
|
/// The "ask for a profile every time the app opens" rule: the pref only bites
|
|
/// when there is more than one profile to pick from.
|
|
///
|
|
/// Stated once because the sites must agree — ActiveProfileBinder defers its
|
|
/// cold-start bind exactly when this holds, and SetupScreen/MainScreen pop the
|
|
/// picker exactly when it holds. If they drifted, the binder would defer a bind
|
|
/// that nothing ever prompts for and the user would land on an unbound screen.
|
|
bool requiresSelectionOnOpen(SettingsService settings) =>
|
|
settings.read(SettingsService.requireProfileSelectionOnOpen) && hasMultipleProfiles;
|
|
}
|