Repository navigation
Status/ServiceUpdate fetcher > disable clear all tasks on screen leave - #353
Conversation
onPause()/onPageSelected() can request cancelling valid status/service update fetchers
Qodana for JVMIt seems all right 👌 No new problems were found according to the checks applied ☁️ View the detailed Qodana report Contact Qodana teamContact us at [email protected]
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request transitions lifecycle-based list adapter visibility management from onResume/onPause to onStart/onStop across multiple fragments, renaming the adapter methods to onVisible and onInvisible. It also introduces a F_CLEAR_ALL_TASKS_ON_LEAVING_SCREEN feature flag to conditionally clear status and service update tasks, marking the corresponding clearAllTasks methods as discouraged. The review feedback highlights a potential issue in ABFragment where a LiveData observer is registered inside onResume(), which can cause duplicate observers and memory leaks upon multiple pause/resume cycles.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the status and service update loading mechanism by replacing 'find' operations with 'triggerRefresh' and updating timestamp tracking. It also transitions list adapters from using onResume/onPause to onVisible/onInvisible across multiple fragments. The review feedback highlights that for parent fragments (FavoritesFragment, HomeFragment, PickPOIDialogFragment, and POIFragment), the onVisible calls should be placed in onStart() instead of onResume() to ensure lifecycle symmetry and align with the guidelines defined in POIArrayAdapter.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors status and service update loading by renaming "find" operations to "triggerRefresh" and updating associated timestamp tracking. It also transitions adapter lifecycle methods from onResume/onPause to onVisible/onInvisible, adjusts fragment lifecycle calls accordingly, and integrates POIRepository to manage the user preference for showing a list instead of a map for route direction stops. Feedback is provided regarding an invalid sort method call on ServiceUpdates in POIManager.java, which should be replaced with sortWith.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Bug was probably related to status+service update loaders > clear all task onPause and no notifyDataSetChanged() in onResume/onVisible after
There was a problem hiding this comment.
Code Review
This pull request refactors the status and service update loading mechanism to use a unified trigger-refresh approach, renames lifecycle-related adapter methods from onResume/onPause to onVisible/onInvisible, and introduces preference updates for route direction display modes. Key feedback highlights a potential ClassCastException when casting activity to MainActivity (since NextMainActivity is also active), a performance concern where getStatus() triggers refreshes continuously when inFocus is true, a compilation issue due to calling sort instead of sortWith on ServiceUpdates, and a recommendation to use the already-cast rds variable in POIViewHolderUtils.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the status and service update loading mechanism, replacing "find" operations with "triggerRefresh" and tracking timestamps to the minute. It also renames adapter lifecycle methods from onResume/onPause to onVisible/onInvisible across multiple fragments, and introduces a POIRepository method to persist whether a route direction should show a list instead of a map. Feedback was provided on POIManager.java to use sortWith instead of sort since ServiceUpdates does not support the standard sort method.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
onPause()/onPageSelected()can request cancelling valid status/service update fetchersRequires:
inFocuscleanup & POI statusvalidity(&useful) commons-android#166