MakeSchool-Tutorials / Makestagram-Swift-V3

14 stars 7 forks source link

Accessing wrong usernames in #18 Improving the UI #74

Closed danieljku closed 7 years ago

danieljku commented 7 years ago

In the section for Configuring our Datasource and Delegate: During the section for modifying the tableView case 0 has the incorrect username call.

case 0: let cell = tableView.dequeueReusableCell(withIdentifier: "PostHeaderCell") as! PostHeaderCell //This retrieves current user that is logged in and sets all the posts username to itself cell.usernameLabel.text = User.current.username

    return cell

it should be corrected to post.poster.username.

ocwang commented 7 years ago

The tutorial is correct in 18. Improving the UI. At that point, the poster property hasn't been added to the Post class yet. It gets added later in 19. Liking Posts.

I'll look it up, but this should be updated in 20. Building the Timeline. If not, then it should be added.

ocwang commented 7 years ago

Yup, this is code is missing in 20. Building the Timeline. Will fix.