https://kotlinlang.org logo
Title
u

user

06/20/2022, 10:21 AM
RxJava show Loading when http request takes more than given amount of time Problem: Recently a design team on a project I'm working on came up with an idea to show loading states only when http request takes more than two seconds to complete. I wanted to go for a reusable piece of code and I created an extension. My approach: Let's say we have 2 seconds delay time after which loading should appear on the screen. In case I get the successful response quicker than 2 seconds, takeUntil completes when condition is satisfied. Loading is not emitted. In case successful...