Added dependencies which fix crash on android 12L/13, improved list layout in inbox

This commit is contained in:
Anton Stubenbord
2023-01-14 19:33:00 +01:00
parent 0eb8e4954c
commit 21462c0463
31 changed files with 492 additions and 234 deletions

View File

@@ -1,14 +1,14 @@
import 'package:flutter/material.dart';
import 'package:paperless_api/paperless_api.dart';
import 'package:paperless_mobile/features/documents/bloc/documents_cubit.dart';
import 'package:paperless_mobile/features/documents/bloc/documents_state.dart';
import 'package:paperless_mobile/generated/l10n.dart';
class BulkDeleteConfirmationDialog extends StatelessWidget {
static const _bulletPoint = "\u2022";
final DocumentsState state;
const BulkDeleteConfirmationDialog({Key? key, required this.state})
: super(key: key);
const BulkDeleteConfirmationDialog({
Key? key,
required this.state,
}) : super(key: key);
@override
Widget build(BuildContext context) {
@@ -29,13 +29,7 @@ class BulkDeleteConfirmationDialog extends StatelessWidget {
.documentsPageSelectionBulkDeleteDialogWarningTextMany,
),
const SizedBox(height: 16),
ConstrainedBox(
constraints: const BoxConstraints(maxHeight: 150),
child: ListView(
shrinkWrap: true,
children: state.selection.map(_buildBulletPoint).toList(),
),
),
...state.selection.map(_buildBulletPoint).toList(),
const SizedBox(height: 16),
Text(
S.of(context).documentsPageSelectionBulkDeleteDialogContinueText),
@@ -61,12 +55,15 @@ class BulkDeleteConfirmationDialog extends StatelessWidget {
}
Widget _buildBulletPoint(DocumentModel doc) {
return Text(
"\t$_bulletPoint ${doc.title}",
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontWeight: FontWeight.w700,
return ListTile(
dense: true,
title: Text(
doc.title,
maxLines: 1,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
fontWeight: FontWeight.w700,
),
),
);
}