This file contains hidden or 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
@JvmName("trackForEventType") | |
fun track( | |
eventType: AnalyticsEventType, | |
properties: Map<String, String>? = null | |
) { | |
eventType.loggerTypes.forEach { logger -> | |
when (logger) { | |
AnalyticsLoggerType.Amplitude -> AmplitudeManager.track(eventType, properties) | |
AnalyticsLoggerType.Airbridge -> AirbridgeManager.track(eventType, properties) | |
} |





This file contains hidden or 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
sealed class ApiResponse<out T> { | |
data class Success<T>(val data: T) : ApiResponse<T>() | |
sealed class Failure(val message: String?) : ApiResponse<Nothing>() { | |
data class HttpError( | |
val statusCode: Int, | |
val statusMessage: String?, | |
val error: ErrorDto? | |
) : Failure(error?.message ?: statusMessage) |
This file contains hidden or 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
/** | |
* example (use in fragment) > | |
* viewLifecycleOwner.lifecycle.addObserver( | |
* FocusClearLifecycleObserver(binding.root, requireActivity()) { | |
* binding.editText.clearFocus() | |
* }) | |
* | |
* example (use in activity) > | |
* lifecycle.addObserver( | |
* FocusClearLifecycleObserver(binding.root, this) { |
This file contains hidden or 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
abstract class BaseListAdapter<T: ListItem, VH : DataBindingBaseViewHolder<T>> | |
: ListAdapter<T, VH>(ListItemDiffUtils()) { | |
} |
NewerOlder