feat: replace mail protocol with smolmail and rebuild the UI

This commit is contained in:
randogoth 2026-09-26 22:45:38 +03:00
parent cb24b68069
commit e94e4158cc
93 changed files with 6387 additions and 3479 deletions

View file

@ -0,0 +1,22 @@
import "package:auto_route/auto_route.dart";
import "package:flutter_riverpod/flutter_riverpod.dart";
import "package:smol_mail/data/providers/providers.dart";
import "package:smol_mail/presentation/routes/app_router.gr.dart";
/// Everything past onboarding needs an identity; the account can still be
/// registered from settings.
class IdentityGuard extends AutoRouteGuard {
final WidgetRef ref;
IdentityGuard(this.ref);
@override
void onNavigation(NavigationResolver resolver, StackRouter router) {
if (ref.read(identityProvider) == null) {
router.replace(OnboardingRoute());
} else {
resolver.next(true);
}
}
}