-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
769f68e
commit ffe7641
Showing
2 changed files
with
21 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (C) 2021 Yaroslav Pronin <[email protected]> | ||
// Copyright (C) 2021-2024 Yaroslav Pronin <[email protected]> | ||
// Copyright (C) 2021 Insurgo Inc. <[email protected]> | ||
// | ||
// This file is part of LibreTrack. | ||
|
@@ -219,7 +219,7 @@ class AppRouterDelegate extends RouterDelegate<AppRoutePath> | |
reportsRouteUpdateToEngine: true, | ||
pages: pages, | ||
onDidRemovePage: (page) { | ||
_popState(); | ||
_stateStack.pop(); | ||
}, | ||
); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (C) 2021 Yaroslav Pronin <[email protected]> | ||
// Copyright (C) 2021-2024 Yaroslav Pronin <[email protected]> | ||
// Copyright (C) 2021 Insurgo Inc. <[email protected]> | ||
// | ||
// This file is part of LibreTrack. | ||
|
@@ -75,11 +75,13 @@ class ParcelsCubit extends Cubit<ParcelsState> { | |
)); | ||
|
||
Future<void> observeParcels() async { | ||
emit(ParcelsState.initial( | ||
filters: state.filters, | ||
search: state.search, | ||
sort: state.sort, | ||
)); | ||
if (!isClosed) { | ||
emit(ParcelsState.initial( | ||
filters: state.filters, | ||
search: state.search, | ||
sort: state.sort, | ||
)); | ||
} | ||
|
||
final group = StreamGroup.mergeBroadcast([ | ||
_trackRepo.observeAllTracks().asyncMap( | ||
|
@@ -119,15 +121,17 @@ class ParcelsCubit extends Cubit<ParcelsState> { | |
archive.add(info); | ||
} | ||
} | ||
emit( | ||
ParcelsState.loaded( | ||
active: active, | ||
archive: archive, | ||
filters: state.filters, | ||
search: state.search, | ||
sort: state.sort, | ||
), | ||
); | ||
if (!isClosed) { | ||
emit( | ||
ParcelsState.loaded( | ||
active: active, | ||
archive: archive, | ||
filters: state.filters, | ||
search: state.search, | ||
sort: state.sort, | ||
), | ||
); | ||
} | ||
}, | ||
failed: (error) { | ||
emit( | ||
|