Vaibhav Jaiswal
02/23/2024, 7:33 AMJoel Denke
02/23/2024, 8:52 AMVaibhav Jaiswal
02/23/2024, 8:54 AMJoel Denke
02/23/2024, 8:57 AMVaibhav Jaiswal
02/23/2024, 9:01 AMJilles van Gurp
02/23/2024, 10:31 AMJoel Denke
02/23/2024, 10:39 AMVaibhav Jaiswal
02/23/2024, 1:18 PMJeff Lockhart
02/23/2024, 2:48 PMMutableStateFlow
directly? Paging in-memory data isn't really necessary, since it's already present in memory. The purpose of paging is to only load a subset of total data into memory at once.Vaibhav Jaiswal
02/23/2024, 3:00 PMLazyPaginItems
How would "not using `PagingData`" work?
By "using MutableStateFlow
" do you mean keeping a mutable state flow in the singleton repository class and emitting in it after an API call and all ViewModels collecting from that?Vaibhav Jaiswal
02/23/2024, 3:00 PMJeff Lockhart
02/23/2024, 3:06 PMMutableStateFlow
in a repository for a reactive in-memory data store, yes. What sort of data is it that you don't need to persist? And what type of queries are you doing? Is this data coming from a backend and you're just caching it locally in memory?Vaibhav Jaiswal
02/23/2024, 3:16 PMSELECT * FROM PostEntity
WHERE creatorId = :creatorId
ORDER BY createdAt DESC
LIMIT :limit OFFSET :offset;
My main use-case of having a db is to observe changes in data in all screens, persistence is not needed, I clear db on app start
Data comes from a backend, and I save it in SQL Delight DB to observe changes everywhere in app
Example, if I like a post, i make api call then update it in DB, so everywhere its shown as liked