mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 14:07:59 -06:00
Removed unused files, code cleanup
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:paperless_api/paperless_api.dart';
|
||||
import 'package:paperless_mobile/features/linked_documents/bloc/state/linked_documents_state.dart';
|
||||
|
||||
class LinkedDocumentsCubit extends Cubit<LinkedDocumentsState> {
|
||||
final PaperlessDocumentsApi _api;
|
||||
|
||||
LinkedDocumentsCubit(this._api, DocumentFilter filter)
|
||||
: super(LinkedDocumentsState(filter: filter)) {
|
||||
_initialize();
|
||||
}
|
||||
|
||||
Future<void> _initialize() async {
|
||||
final documents = await _api.findAll(
|
||||
state.filter.copyWith(
|
||||
pageSize: 100,
|
||||
),
|
||||
);
|
||||
emit(LinkedDocumentsState(
|
||||
isLoaded: true,
|
||||
documents: documents,
|
||||
filter: state.filter,
|
||||
));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user