mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 14:07:59 -06:00
fix: Improve receiving shares
This commit is contained in:
@@ -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";
|
||||
}
|
||||
|
||||
@@ -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,
|
||||
|
||||
23
lib/routes/typed/top_level/checking_login_route.dart
Normal file
23
lib/routes/typed/top_level/checking_login_route.dart
Normal 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..."),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
23
lib/routes/typed/top_level/logging_out_route.dart
Normal file
23
lib/routes/typed/top_level/logging_out_route.dart
Normal 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..."),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user