fix: Improve receiving shares

This commit is contained in:
Anton Stubenbord
2023-10-03 17:49:38 +02:00
parent 37ed8bbb04
commit ad23df4f89
29 changed files with 529 additions and 348 deletions

View File

@@ -21,4 +21,6 @@ class R {
static const linkedDocuments = "linkedDocuments";
static const bulkEditDocuments = "bulkEditDocuments";
static const uploadQueue = "uploadQueue";
static const checkingLogin = "checkingLogin";
static const loggingOut = "loggingOut";
}

View File

@@ -61,11 +61,15 @@ class ProviderShellRoute extends ShellRouteData {
) {
final currentUserId = Hive.box<GlobalSettings>(HiveBoxes.globalSettings)
.getValue()!
.loggedInUserId!;
.loggedInUserId;
if (currentUserId == null) {
return const SizedBox.shrink();
}
final authenticatedUser =
Hive.box<LocalUserAccount>(HiveBoxes.localUserAccount).get(
currentUserId,
)!;
return HomeShellWidget(
localUserId: authenticatedUser.id,
paperlessApiVersion: authenticatedUser.apiVersion,

View File

@@ -0,0 +1,23 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:paperless_mobile/routes/routes.dart';
part 'checking_login_route.g.dart';
@TypedGoRoute<CheckingLoginRoute>(
path: "/checking-login",
name: R.checkingLogin,
)
class CheckingLoginRoute extends GoRouteData {
const CheckingLoginRoute();
@override
Widget build(BuildContext context, GoRouterState state) {
return Scaffold(
body: Center(
child: Text("Logging in..."),
),
);
}
}

View File

@@ -0,0 +1,23 @@
import 'dart:async';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:paperless_mobile/routes/routes.dart';
part 'logging_out_route.g.dart';
@TypedGoRoute<LogginOutRoute>(
path: "/logging-out",
name: R.loggingOut,
)
class LogginOutRoute extends GoRouteData {
const LogginOutRoute();
@override
Widget build(BuildContext context, GoRouterState state) {
return Scaffold(
body: Center(
child: Text("Logging out..."),
),
);
}
}