Removed unused files, code cleanup

This commit is contained in:
Anton Stubenbord
2023-01-22 14:34:58 +01:00
parent b370fa4164
commit 9bfb6aa661
42 changed files with 248 additions and 589 deletions

View File

@@ -1,5 +0,0 @@
extension DateComparisons on DateTime {
bool isEqualToIgnoringDate(DateTime other) {
return day == other.day && month == other.month && year == other.year;
}
}

View File

@@ -1,6 +1,5 @@
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:paperless_mobile/features/login/bloc/authentication_state.dart';
import 'package:paperless_mobile/features/settings/bloc/application_settings_cubit.dart';
import 'package:paperless_mobile/features/settings/model/application_settings_state.dart';
extension AddressableHydratedStorage on Storage {

View File

@@ -1,22 +0,0 @@
import 'dart:io';
import 'package:paperless_mobile/features/login/model/client_certificate.dart';
extension ClientCertificateHandlingSecurityContext on SecurityContext {
SecurityContext withClientCertificate(ClientCertificate? clientCertificate) {
if (clientCertificate == null) return this;
return this
..usePrivateKeyBytes(
clientCertificate.bytes,
password: clientCertificate.passphrase,
)
..useCertificateChainBytes(
clientCertificate.bytes,
password: clientCertificate.passphrase,
)
..setTrustedCertificatesBytes(
clientCertificate.bytes,
password: clientCertificate.passphrase,
);
}
}

View File

@@ -1,7 +0,0 @@
extension SizeLimitedString on String {
String withLengthLimitedTo(int length, [String overflow = "..."]) {
return this.length > length
? '${substring(0, length - overflow.length)}$overflow'
: this;
}
}