mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 12:07:58 -06:00
fix: Add owner to labels
This commit is contained in:
@@ -12,6 +12,7 @@ import 'package:paperless_mobile/core/service/file_description.dart';
|
||||
import 'package:paperless_mobile/core/service/file_service.dart';
|
||||
import 'package:paperless_mobile/features/notifications/services/local_notification_service.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
import 'package:cross_file/cross_file.dart';
|
||||
|
||||
part 'document_details_cubit.freezed.dart';
|
||||
part 'document_details_state.dart';
|
||||
|
||||
@@ -79,7 +79,7 @@ class _DocumentDownloadButtonState extends State<DocumentDownloadButton> {
|
||||
break;
|
||||
}
|
||||
|
||||
if (Platform.isAndroid && androidInfo!.version.sdkInt! <= 29) {
|
||||
if (Platform.isAndroid && androidInfo!.version.sdkInt <= 29) {
|
||||
final isGranted = await askForPermission(Permission.storage);
|
||||
if (!isGranted) {
|
||||
return;
|
||||
|
||||
@@ -78,7 +78,7 @@ class _DocumentShareButtonState extends State<DocumentShareButton> {
|
||||
break;
|
||||
}
|
||||
|
||||
if (Platform.isAndroid && androidInfo!.version.sdkInt! < 30) {
|
||||
if (Platform.isAndroid && androidInfo!.version.sdkInt < 30) {
|
||||
final isGranted = await askForPermission(Permission.storage);
|
||||
if (!isGranted) {
|
||||
return;
|
||||
|
||||
@@ -196,14 +196,15 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
|
||||
),
|
||||
label: S.of(context)!.documents,
|
||||
),
|
||||
RouteDescription(
|
||||
icon: const Icon(Icons.document_scanner_outlined),
|
||||
selectedIcon: Icon(
|
||||
Icons.document_scanner,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
if (LocalUserAccount.current.paperlessUser.hasPermission(UserPermissions.addDocument))
|
||||
RouteDescription(
|
||||
icon: const Icon(Icons.document_scanner_outlined),
|
||||
selectedIcon: Icon(
|
||||
Icons.document_scanner,
|
||||
color: Theme.of(context).colorScheme.primary,
|
||||
),
|
||||
label: S.of(context)!.scanner,
|
||||
),
|
||||
label: S.of(context)!.scanner,
|
||||
),
|
||||
RouteDescription(
|
||||
icon: const Icon(Icons.sell_outlined),
|
||||
selectedIcon: Icon(
|
||||
@@ -234,8 +235,8 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver {
|
||||
];
|
||||
final routes = <Widget>[
|
||||
const DocumentsPage(),
|
||||
if (LocalUserAccount.current.paperlessUser.hasPermission(UserPermissions.changeDocument))
|
||||
const ScannerPage(),
|
||||
if (LocalUserAccount.current.paperlessUser.hasPermission(UserPermissions.addDocument))
|
||||
const ScannerPage(),
|
||||
const LabelsPage(),
|
||||
const InboxPage(),
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user