Skip to content

Commit

Permalink
Fix missing account message during parcel refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
proninyaroslav committed Sep 10, 2024
1 parent d56ede7 commit 412809c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/ui/parcel_details/model/parcel_error_banner_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,11 @@ class ParcelErrorBannerCubit extends Cubit<ParcelErrorBannerState> {
!lastTrackingInfo.invalidTrackNumber &&
info.trackServices.any((trackService) => !trackService.isActive);
bool showMissingAuthData = false;
bool showMissingAccount = true;
bool showMissingAccount = false;
bool showAuthError = false;
if (lastTrackingResponse != null) {
if (lastTrackingResponse != null && lastTrackingResponse.isNotEmpty) {
showMissingAccount = true;

for (final info in lastTrackingResponse) {
final errorType = info.error?.type;

Expand Down
6 changes: 4 additions & 2 deletions lib/ui/parcels/components/sliver_parcels_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -452,8 +452,10 @@ List<Widget> _buildAuthErrorStatus(
List<TrackingResponseInfo>? lastTrackingResponse,
) {
bool missingAuthData = false;
bool missingAccount = true;
if (lastTrackingResponse != null) {
bool missingAccount = false;
if (lastTrackingResponse != null && lastTrackingResponse.isNotEmpty) {
missingAccount = true;

for (final info in lastTrackingResponse) {
final errorType = info.error?.type;

Expand Down

0 comments on commit 412809c

Please sign in to comment.