-
Notifications
You must be signed in to change notification settings - Fork 101
Redundant Nulls Removal #2055
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Redundant Nulls Removal #2055
Conversation
- Rewrote some logic to mitigate need for nullable variables (i.e., empty strings instead of nullables)
- app_provider - ImageLoader - Image - NoticesModel, NoticesCard - BuildInfo - ContinueReadingButton - LinkifyWithCatch - CardContainer (partially) - WebViewContainer (partially) - DotsIndicator - EventTime - LastUpdatedWidget - TimeRangeWidget - DiningCard (partially), DiningDataProvider (partially), Item model, DiningMenuItem - EmployeeIdDataProvider (partially) - EventsDataProvider, EventsModel - ScannerMessageDataProvider - SpeedTestProvider (partially) - Shuttle (partially) - MessagesDataProvider, MessageService
- ParkingModel, all Parking cards - CardsProvider - Home card
- News - EventsModel - NoticesDataProvider - UserDataProvider, UserProfileService - Notifications models, Notifications cards, Notifications providers - WebView - PushNotifications (wrapper) - EmployeeIdDataProvider - MapSearchModel, MapSearchService, MapsDataProvider, Maps cards
…ls_removal # Conflicts: # ios/Podfile.lock # lib/core/models/availability.dart # lib/core/providers/availability.dart # lib/core/providers/cards.dart # lib/core/providers/messages.dart # lib/core/providers/user.dart # lib/core/services/dining.dart # lib/core/services/map.dart # lib/core/services/triton_media.dart # lib/core/services/weather.dart # lib/ui/availability/availability_display.dart # lib/ui/availability/manage_availability_view.dart # lib/ui/common/webview_container.dart # lib/ui/notifications/notifications_list_view.dart # lib/ui/profile/login.dart
Cleaned up some merge mistakes
…w? The way Coordinates is set up in the app, the entire system needs to be redesigned at some point to prevent future bugs like this
Talked w/ Charles. Decided to pause this until the Dart 3 migration gets merged in |
Spoke with Alex. Most likely this will be paused until after the next release of Campus Mobile |
…ls_removal # Conflicts: # lib/app_networking.dart # lib/core/models/triton_media.dart # lib/core/providers/cards.dart # lib/core/providers/events.dart # lib/core/providers/map.dart # lib/core/providers/messages.dart # lib/core/providers/news.dart # lib/core/providers/notices.dart # lib/core/providers/notifications_freefood.dart # lib/core/providers/scanner.dart # lib/core/providers/scanner_message.dart # lib/core/providers/speed_test.dart # lib/core/providers/triton_media.dart # lib/core/providers/user.dart # lib/core/services/availability.dart # lib/core/services/cards.dart # lib/core/services/dining.dart # lib/core/services/map.dart # lib/core/services/messages.dart # lib/core/services/notices.dart # lib/core/services/triton_media.dart # lib/core/services/user.dart # lib/core/services/weather.dart # lib/ui/common/build_info.dart # lib/ui/my_chart/my_chart_card.dart # lib/ui/notifications/notifications_list_view.dart # lib/ui/parking/circular_parking_indicator.dart # lib/ui/parking/spot_types_view.dart # lib/ui/profile/cards.dart # lib/ui/triton_media/triton_media_card.dart # lib/ui/triton_media/triton_media_detail_view.dart # lib/ui/triton_media/triton_media_list.dart # lib/ui/triton_media/triton_media_tile.dart # lib/ui/triton_media/triton_media_view_all.dart
Finished manual merge w/ experimental. After thoroughly resolving build tools issues, there does not appear to be any regressions. Still should be monitored... |
…ls_removal # Conflicts: # lib/app_networking.dart # lib/app_provider.dart # lib/ui/onboarding/onboarding_screen.dart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and was tested. Any issues that arise going forward will be treated as separate bug tasks
…ls_removal # Conflicts: # lib/core/providers/cards.dart # lib/ui/common/card_container.dart # lib/ui/home/home.dart # lib/ui/profile/cards.dart
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests passed. Latest commit was a merge w/ experimental - low chance for any regressions. Looks good
messages.forEach((m) async { | ||
if (m!.audience != null && | ||
m.audience!.topics != null && | ||
(m.audience!.topics!.contains("freeFood") || m.audience!.topics!.contains("testFreeFood"))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@morebytes May we plan to revert or discuss for 7.31? The testFreeFood
condition is is required to fully test Free Food notifications.
Summary
Campus Mobile codebase contains a large number of unnecessary nullable variables and null checks. This issue removes a majority of the redundant nulls.
Resolves #1955
Changelog
[General] [Change] - Removed redundant nulls throughout the app
Test Plan