mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-06 09:15:48 -06:00
Added dependencies which fix crash on android 12L/13, improved list layout in inbox
This commit is contained in:
@@ -236,8 +236,10 @@ class _DocumentUploadPreparationPageState
|
||||
|
||||
final taskId = await cubit.upload(
|
||||
widget.fileBytes,
|
||||
filename:
|
||||
_padWithPdfExtension(_formKey.currentState?.value[fkFileName]),
|
||||
filename: _padWithExtension(
|
||||
_formKey.currentState?.value[fkFileName],
|
||||
widget.fileExtension,
|
||||
),
|
||||
title: title,
|
||||
documentType: docType.id,
|
||||
correspondent: correspondent.id,
|
||||
@@ -261,11 +263,12 @@ class _DocumentUploadPreparationPageState
|
||||
}
|
||||
}
|
||||
|
||||
String _padWithPdfExtension(String source) {
|
||||
return source.endsWith(".pdf") ? source : '$source.pdf';
|
||||
String _padWithExtension(String source, [String? extension]) {
|
||||
final ext = extension ?? '.pdf';
|
||||
return source.endsWith(ext) ? source : '$source$ext';
|
||||
}
|
||||
|
||||
String _formatFilename(String source) {
|
||||
return source.replaceAll(RegExp(r"[\W_]"), "_");
|
||||
return source.replaceAll(RegExp(r"[\W_]"), "_").toLowerCase();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user