added initial draft of inbox

This commit is contained in:
Anton Stubenbord
2022-11-22 01:33:50 +01:00
parent a7295fb739
commit 8e7a5dddbf
16 changed files with 243 additions and 27 deletions

View File

@@ -27,6 +27,4 @@ abstract class LabelRepository {
Future<StoragePath> saveStoragePath(StoragePath path);
Future<StoragePath> updateStoragePath(StoragePath path);
Future<int> deleteStoragePath(StoragePath path);
Future<int> getStatistics();
}

View File

@@ -120,15 +120,6 @@ class LabelRepositoryImpl implements LabelRepository {
throw const ErrorMessage(ErrorCode.tagCreateFailed);
}
@override
Future<int> getStatistics() async {
final response = await httpClient.get(Uri.parse('/api/statistics/'));
if (response.statusCode == 200) {
return jsonDecode(utf8.decode(response.bodyBytes))['documents_total'];
}
throw const ErrorMessage(ErrorCode.unknown);
}
@override
Future<int> deleteCorrespondent(Correspondent correspondent) async {
assert(correspondent.id != null);