This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Execute [block] and operate [predicate] on returned value. Each retries can be separated by | |
* [delay] if necessary. | |
* | |
* @param count Number of tries before failing. | |
* @param delay Delay between retries | |
* @param block Code to execute | |
* @param predicate Predicate to execute. | |
*/ | |
suspend fun <T> retryWithPredicate( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Observable manager for saving the [Cart]'s resource information. | |
*/ | |
class CartManager : LiveData<Resource<Cart?>>() { | |
init { | |
value = Success(null) | |
} | |
/** |