mirror of
https://github.com/Xevion/paperless-mobile.git
synced 2025-12-08 18:08:07 -06:00
Cleaned up code, implemented message queue to notify subscribers of document updates.
This commit is contained in:
@@ -158,18 +158,16 @@ class _DocumentSearchPageState extends State<DocumentSearchPage> {
|
||||
isLabelClickable: false,
|
||||
isLoading: state.isLoading,
|
||||
hasLoaded: state.hasLoaded,
|
||||
onTap: (document) async {
|
||||
final updatedDocument = await Navigator.pushNamed(
|
||||
enableHeroAnimation: false,
|
||||
onTap: (document) {
|
||||
Navigator.pushNamed(
|
||||
context,
|
||||
DocumentDetailsRoute.routeName,
|
||||
arguments: DocumentDetailsRouteArguments(
|
||||
document: document,
|
||||
isLabelClickable: false,
|
||||
),
|
||||
) as DocumentModel?;
|
||||
if (updatedDocument != document) {
|
||||
context.read<DocumentSearchCubit>().reload();
|
||||
}
|
||||
);
|
||||
},
|
||||
)
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user