SkeletonLayout icon indicating copy to clipboard operation
SkeletonLayout copied to clipboard

skeleton.showOriginal() not showing

Open MhmmdRFadhil opened this issue 1 year ago • 0 comments

is there something wrong with the following script? because the original data does not appear

private fun getData() {
        newsViewModel.getNewsList().observe(viewLifecycleOwner) {
            when (it) {
                is Response.Loading -> skeleton?.showSkeleton()
                is Response.Success -> {
                    skeleton?.showOriginal()
                    newsAdapter.add(it.data)
                }

                is Response.Fail -> {
                    it.e.message.toString().snackBarErrorMessage(activity as MainActivity)
                    skeleton?.showSkeleton()
                }
            }
        }
    }

MhmmdRFadhil avatar May 17 '23 22:05 MhmmdRFadhil