Architecture-components-samples: GitHubBrowserSample: Exposing SingleLiveEvent for Retrofit

Created on 27 Jan 2018  路  2Comments  路  Source: android/architecture-components-samples

The GitHubBrowerSample uses LiveData for Room and Retrofit while it doesn't make sense to have LiveData for Retrofit as it's a one-off event.
Exposing SingleLiveEvent makes more sense instead of LiveData

Most helpful comment

@AkshayChordiya but with SingleLiveEvent will not trigger the cache data when config change occur

All 2 comments

@AkshayChordiya but with SingleLiveEvent will not trigger the cache data when config change occur

Yep, you want LiveData for immediately returning cached values.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PingForward picture PingForward  路  16Comments

ShahakM picture ShahakM  路  13Comments

nuxzero picture nuxzero  路  14Comments

kekefigure picture kekefigure  路  13Comments

iammert picture iammert  路  14Comments