mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-11 10:08:02 -06:00
Fixed visual bugs, added notifications on document upload success, enabled editing in inbox, added hints
This commit is contained in:
@@ -1,17 +1,54 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
import 'package:paperless_api/paperless_api.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'inbox_state.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class InboxState with EquatableMixin {
|
||||
@JsonKey(ignore: true)
|
||||
final bool isLoaded;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
final Iterable<int> inboxTags;
|
||||
|
||||
@JsonKey(ignore: true)
|
||||
final Iterable<DocumentModel> inboxItems;
|
||||
|
||||
final bool isHintAcknowledged;
|
||||
|
||||
const InboxState({
|
||||
this.isLoaded = false,
|
||||
this.inboxTags = const [],
|
||||
this.inboxItems = const [],
|
||||
this.isHintAcknowledged = false,
|
||||
});
|
||||
|
||||
@override
|
||||
List<Object?> get props => [isLoaded, inboxTags, inboxItems];
|
||||
List<Object?> get props => [
|
||||
isLoaded,
|
||||
inboxTags,
|
||||
inboxItems,
|
||||
isHintAcknowledged,
|
||||
];
|
||||
|
||||
InboxState copyWith({
|
||||
bool? isLoaded,
|
||||
Iterable<int>? inboxTags,
|
||||
Iterable<DocumentModel>? inboxItems,
|
||||
bool? isHintAcknowledged,
|
||||
}) {
|
||||
return InboxState(
|
||||
isLoaded: isLoaded ?? this.isLoaded,
|
||||
inboxItems: inboxItems ?? this.inboxItems,
|
||||
inboxTags: inboxTags ?? this.inboxTags,
|
||||
isHintAcknowledged: isHintAcknowledged ?? this.isHintAcknowledged,
|
||||
);
|
||||
}
|
||||
|
||||
factory InboxState.fromJson(Map<String, dynamic> json) =>
|
||||
_$InboxStateFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$InboxStateToJson(this);
|
||||
}
|
||||
|
||||
16
lib/features/inbox/bloc/state/inbox_state.g.dart
Normal file
16
lib/features/inbox/bloc/state/inbox_state.g.dart
Normal file
@@ -0,0 +1,16 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'inbox_state.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
InboxState _$InboxStateFromJson(Map<String, dynamic> json) => InboxState(
|
||||
isHintAcknowledged: json['isHintAcknowledged'] as bool? ?? false,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$InboxStateToJson(InboxState instance) =>
|
||||
<String, dynamic>{
|
||||
'isHintAcknowledged': instance.isHintAcknowledged,
|
||||
};
|
||||
Reference in New Issue
Block a user