ca-love/lounge

Interceptor to avoid submit empty models

lcdsmao opened this issue · 0 comments

⚠️ Is your feature request related to a problem? Please describe

override fun buildModels {
  if (loading) return
  if (list.isEmpty) return
  list.map { it.toModel() }
}

We may want to only submit built models when list loaded and list is not empty.

💡 Describe the solution you'd like

Combine LoungeControllerInterceptor and awaitCancellation() when built models is empty should solve this promblem.

🤚 Do you want to develop this feature yourself?

  • Yes
  • No