mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-07 07:15:47 -06:00
Fixed FABs stacking on form fields, some other minor improvements
This commit is contained in:
@@ -100,12 +100,19 @@ class DocumentsCubit extends Cubit<DocumentsState> {
|
||||
/// Update filter state and automatically reload documents. Always resets page to 1.
|
||||
/// Use [DocumentsCubit.loadMore] to load more data.
|
||||
Future<void> updateFilter({
|
||||
DocumentFilter filter = DocumentFilter.initial,
|
||||
final DocumentFilter filter = DocumentFilter.initial,
|
||||
}) async {
|
||||
final result = await documentRepository.find(filter.copyWith(page: 1));
|
||||
emit(DocumentsState(filter: filter, value: [result], isLoaded: true));
|
||||
}
|
||||
|
||||
///
|
||||
/// Convenience method which allows to directly use [DocumentFilter.copyWith] on the current filter.
|
||||
///
|
||||
Future<void> updateCurrentFilter(final DocumentFilter Function(DocumentFilter) transformFn) {
|
||||
return updateFilter(filter: transformFn(state.filter));
|
||||
}
|
||||
|
||||
void toggleDocumentSelection(DocumentModel model) {
|
||||
if (state.selection.contains(model)) {
|
||||
emit(
|
||||
|
||||
Reference in New Issue
Block a user