mirror of
https://github.com/immich-app/immich
synced 2025-10-17 18:19:27 +00:00
Refactor mobile to use OpenApi generated SDK (#336)
This commit is contained in:
parent
d69470e207
commit
ae7e582ec8
276 changed files with 14513 additions and 3003 deletions
|
|
@ -46,12 +46,15 @@ void main() async {
|
|||
Locale('de', 'DE')
|
||||
];
|
||||
|
||||
runApp(EasyLocalization(
|
||||
runApp(
|
||||
EasyLocalization(
|
||||
supportedLocales: locales,
|
||||
path: 'assets/i18n',
|
||||
useFallbackTranslations: true,
|
||||
fallbackLocale: locales.first,
|
||||
child: const ProviderScope(child: ImmichApp())));
|
||||
child: const ProviderScope(child: ImmichApp()),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
class ImmichApp extends ConsumerStatefulWidget {
|
||||
|
|
@ -111,6 +114,7 @@ class ImmichAppState extends ConsumerState<ImmichApp>
|
|||
@override
|
||||
initState() {
|
||||
super.initState();
|
||||
|
||||
initApp().then((_) => debugPrint("App Init Completed"));
|
||||
}
|
||||
|
||||
|
|
@ -120,10 +124,9 @@ class ImmichAppState extends ConsumerState<ImmichApp>
|
|||
super.dispose();
|
||||
}
|
||||
|
||||
final _immichRouter = AppRouter();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var router = ref.watch(appRouterProvider);
|
||||
ref.watch(releaseInfoProvider.notifier).checkGithubReleaseInfo();
|
||||
|
||||
return MaterialApp(
|
||||
|
|
@ -142,7 +145,8 @@ class ImmichAppState extends ConsumerState<ImmichApp>
|
|||
primarySwatch: Colors.indigo,
|
||||
fontFamily: 'WorkSans',
|
||||
snackBarTheme: const SnackBarThemeData(
|
||||
contentTextStyle: TextStyle(fontFamily: 'WorkSans')),
|
||||
contentTextStyle: TextStyle(fontFamily: 'WorkSans'),
|
||||
),
|
||||
scaffoldBackgroundColor: immichBackgroundColor,
|
||||
appBarTheme: const AppBarTheme(
|
||||
backgroundColor: immichBackgroundColor,
|
||||
|
|
@ -152,9 +156,10 @@ class ImmichAppState extends ConsumerState<ImmichApp>
|
|||
systemOverlayStyle: SystemUiOverlayStyle.dark,
|
||||
),
|
||||
),
|
||||
routeInformationParser: _immichRouter.defaultRouteParser(),
|
||||
routerDelegate: _immichRouter.delegate(
|
||||
navigatorObservers: () => [TabNavigationObserver(ref: ref)]),
|
||||
routeInformationParser: router.defaultRouteParser(),
|
||||
routerDelegate: router.delegate(
|
||||
navigatorObservers: () => [TabNavigationObserver(ref: ref)],
|
||||
),
|
||||
),
|
||||
const ImmichLoadingOverlay(),
|
||||
const VersionAnnouncementOverlay(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue