Skip to content

Commit

Permalink
fix: Improve performance in home and event program screen (analytics …
Browse files Browse the repository at this point in the history
…tab) (#3595)

* Improve performance in home screen (analytics tab)

* Improve performance in program event screen (analytics tab)

* Refactor condition

* Restore deleted code
  • Loading branch information
vgarciabnz authored Apr 18, 2024
1 parent 7b09f1b commit e0f58ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class HomeRepositoryImpl(
}

override fun hasHomeAnalytics(): Boolean {
return charts?.getHomeVisualizations(null)?.isNotEmpty() == true
return charts?.getVisualizationGroups(null)?.isNotEmpty() == true
}

override fun getServerVersion(): Single<SystemInfo?> {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class ProgramEventDetailRepositoryImpl internal constructor(
}

override fun programHasAnalytics(): Boolean {
return charts != null && charts.getProgramVisualizations(null, programUid).isNotEmpty()
return charts?.getVisualizationGroups(programUid)?.isNotEmpty() == true
}

override fun isEventEditable(eventUid: String): Boolean {
Expand Down

0 comments on commit e0f58ca

Please sign in to comment.