r-park/soundcloud-ngrx

What is the intention of not updating users state?

Closed this issue · 1 comments

According to the test case users-reducer.spec.ts:

should NOT replace existing user if existing user is profile

and the code

if (!users.has(user.id) || !users.get(user.id).profile) {

Is it true that if a user's profile (https://soundcloud-ngrx.herokuapp.com/users/632699/tracks) has been visited once, new user data like numbers of likes, followers, following will never be updated again between navigations unless the user refresh the browser?

That if statement probably doesn't need to be there — there may have been a reason at one point but I don't recall. Looks like a simple merge/deep-merge should suffice.