Skip to content

Skeleton doesn't hide after API Call (Coroutine) #37

@billypap1

Description

@billypap1

I have an issue with this library:
I call an external API via Coroutines and fetch the data. When I receive the data I want to hide the skeletons but it doesn't work. My code below:

CoroutineScope(Dispatchers.IO).launch {
                                              val response =
                                                  service.fetchResults(finalUrl)
                                              withContext(Dispatchers.Main) {
                                                  try {
                                                      if (response.isSuccessful) {
                                                          textViewTitle.hideSkeleton()

                                                      }
                                                 } catch (e: HttpException) {
                                                      Log.d("TAG", "error ")
                                                  } catch (e: Throwable) {
                                                      Log.d("TAG", "error" + e)
                                                  }
                                                  }

                                              }
                                          }

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions