chore(feed): delete the dead _LoadingIndicator - #6559
Conversation
The private _LoadingIndicator/_LoadingIndicatorState pair in pooled_fullscreen_video_feed_screen.dart was never instantiated. It is file-private and the file has no part directive, so nothing outside can reach it either. It also carried the last non-doc reference to the seek-based loop enforcement removed in #6489: its _delay constant was justified with "flashes that occur during play/pause and loop-enforcement seeks". Deleting the widget is the right fix rather than trimming a comment on code that never builds.
Mobile PR PreviewPreview refreshed for Last refresh:
|
mbradley
left a comment
There was a problem hiding this comment.
Verified the deletion independently: the four _LoadingIndicator references on main are all self-referential (declaration, constructor, createState, State class), the file has no part directive so nothing external could reach it, and the three same-named classes elsewhere (add_to_list_dialog.dart, camera_permission_gate.dart, video_loading_placeholder.dart) are separate file-scoped widgets that are all instantiated. dart:async stays load-bearing via unawaited, and BrandedLoadingIndicator is still used at lines 711 and 1033. Analyze clean and 47/47 on the four cited test files locally.
Also traced why it was dead, since a deletion is the wrong move if a call site was dropped by accident. It wasn't: d1486f3e8 (#4682, native-video migration) removed the entire containing widget wholesale and left this pair orphaned. The affordance itself moved rather than disappearing — this screen renders through FeedVideos, which renders VideoLoadingPlaceholder. So there's no regression being frozen in place here.
Description
Deletes the private
_LoadingIndicator/_LoadingIndicatorStatepair inmobile/lib/screens/feed/pooled_fullscreen_video_feed_screen.dart. It is never instantiated — the only four references in the repo were its own class declaration, constructor,createState, and the State class. It is file-private and the file has nopartdirective, so nothing outside could reach it either.The other
_LoadingIndicators that grep turns up (add_to_list_dialog.dart,camera_permission_gate.dart,video_loading_placeholder.dart) are separate file-scoped classes and all in use.Why delete rather than polish: the widget carried the last non-doc reference to the seek-based loop enforcement removed in #6489 — its
_delayconstant was justified with "flashes that occur during play/pause and loop-enforcement seeks". Trimming that comment was suggested during review of #6489, but touching up a widget that never builds is the wrong fix.Related Issue: Closes #6492
Out of Scope
None. Pure deletion, no behaviour change.
Verification
dart:asyncis still needed forunawaited/Future, andBrandedLoadingIndicatoris still used at two other call sites in the same file.flutter analyzeon the changed file — no issues.flutter test test/screens/feed/pooled_fullscreen_video_feed_screen_test.dart test/screens/feed/pooled_fullscreen_video_feed_args_test.dart test/screens/feed/video_tap_shield_test.dart test/screens/feed/keyboard_aware_top_fade_test.dart— 47/47 pass.Type of Change