android / android/architecture-samples

[todo-mvp] Change setLoadingIndicator to two separate functions

Open
#542 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
45.8k
Forks
11.9k
PR merge metrics
No merged PRs in 30d

Description

According to SOLID principles, a function should have only a single responsibility, but the `setLoadingIndicator()` function has two responsibilities, showing and hiding. I want to break it into two functions such as `showLoadingIndicator()` and `hideLoadingIndicator()`.

Contributor guide

Open the contributing guide

Research direction

Search the repository for setLoadingIndicator() and inspect its callers to understand the existing show and hide behavior. Split those responsibilities into separate showLoadingIndicator() and hideLoadingIndicator() functions, then verify that all callers still produce the expected loading-indicator behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.