Implemented inbox (still WIP)

This commit is contained in:
Anton Stubenbord
2022-11-24 13:37:25 +01:00
parent 8e7a5dddbf
commit eb5025e8ca
44 changed files with 674 additions and 316 deletions

View File

@@ -11,7 +11,8 @@ import 'package:intl/intl.dart';
import 'package:intl/intl_standalone.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:paperless_mobile/core/bloc/connectivity_cubit.dart';
import 'package:paperless_mobile/core/bloc/label_bloc_provider.dart';
import 'package:paperless_mobile/core/bloc/paperless_statistics_cubit.dart';
import 'package:paperless_mobile/features/labels/bloc/label_bloc_provider.dart';
import 'package:paperless_mobile/core/bloc/paperless_server_information_cubit.dart';
import 'package:paperless_mobile/core/global/asset_images.dart';
import 'package:paperless_mobile/core/global/constants.dart';
@@ -194,15 +195,6 @@ class _AuthenticationWrapperState extends State<AuthenticationWrapper> {
ReceiveSharingIntent.getInitialMedia().then(handleReceivedFiles);
}
@override
void didChangeDependencies() {
FlutterNativeSplash.remove();
for (var element in AssetImages.values) {
element.load(context);
}
super.didChangeDependencies();
}
@override
Widget build(BuildContext context) {
return SafeArea(
@@ -215,9 +207,6 @@ class _AuthenticationWrapperState extends State<AuthenticationWrapper> {
final bool showIntroSlider =
authState.isAuthenticated && !authState.wasLoginStored;
if (showIntroSlider) {
for (final img in AssetImages.values) {
img.load(context);
}
Navigator.push(
context,
MaterialPageRoute(
@@ -229,10 +218,14 @@ class _AuthenticationWrapperState extends State<AuthenticationWrapper> {
},
builder: (context, authentication) {
if (authentication.isAuthenticated) {
return const LabelBlocProvider(
child: HomePage(),
return BlocProvider.value(
value: getIt<PaperlessStatisticsCubit>(),
child: const LabelBlocProvider(
child: HomePage(),
),
);
} else {
FlutterNativeSplash.remove();
return const LoginPage();
}
},