bhatnagarm
02/27/2020, 11:34 AMZach Klippenstein (he/him) [MOD]
02/27/2020, 2:52 PMbhatnagarm
02/28/2020, 11:15 AMZach Klippenstein (he/him) [MOD]
02/28/2020, 10:33 PMbhatnagarm
03/07/2020, 9:27 AMZach Klippenstein (he/him) [MOD]
03/09/2020, 4:27 AMbhatnagarm
03/09/2020, 4:30 AMZach Klippenstein (he/him) [MOD]
03/09/2020, 5:12 AMbhatnagarm
03/09/2020, 5:31 AMZach Klippenstein (he/him) [MOD]
03/09/2020, 3:27 PMNetworkBoundResource
- is that type from a library?Zach Klippenstein (he/him) [MOD]
03/09/2020, 4:41 PMliveData
builder to create LiveDatas from your suspend functions, but I would recommend using something like github.com/dropbox/Store instead - it is an actual repository library and has first-class coroutine supportbhatnagarm
03/09/2020, 5:54 PMZach Klippenstein (he/him) [MOD]
03/09/2020, 6:01 PMBut isn’t it contradictory having LiveData exposed from the suspend func as it would break the core concept.You’re right, but it looks like
NetworkBoundResource
is using the `LiveData`s from its abstract methods as single-emission futures, not as streams. This is very much not what LiveData
was designed for, I would consider it a pretty big smell. Again, I’d much rather use a real repository library like Store than copy/pasting (likely obsolete) sample code.bhatnagarm
03/16/2020, 7:26 PM