mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-10 18:07:59 -06:00
fix: Adapt to new provider strucutre
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:paperless_api/paperless_api.dart';
|
||||
import 'package:paperless_mobile/core/bloc/server_information_state.dart';
|
||||
|
||||
class ServerInformationCubit extends Cubit<ServerInformationState> {
|
||||
final PaperlessServerStatsApi _api;
|
||||
|
||||
ServerInformationCubit(this._api) : super(ServerInformationState());
|
||||
|
||||
Future<void> updateInformation() async {
|
||||
final information = await _api.getServerInformation();
|
||||
emit(ServerInformationState(
|
||||
isLoaded: true,
|
||||
information: information,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
import 'package:paperless_api/paperless_api.dart';
|
||||
|
||||
class ServerInformationState {
|
||||
final bool isLoaded;
|
||||
final PaperlessServerInformationModel? information;
|
||||
|
||||
ServerInformationState({
|
||||
this.isLoaded = false,
|
||||
this.information,
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user