Githawk: Reaction detail label incorrect

Created on 13 Oct 2017  ยท  12Comments  ยท  Source: GitHawkApp/GitHawk

Latest TF version

When 4+ people reacting it should say name, name, name and x others, but it seems to just stop after 3 here ๐Ÿค”

https://github.com/rnystrom/GitHawk/blob/master/Classes/Issues/Comments/Reactions/IssueCommentReactionCell.swift#L156-L176

img_0250

๐Ÿ› bug

All 12 comments

OK, so model.users.count is definitely just 3 there.

Sent with GitHawk

We use model.count for the actual label - which is (correctly) 5. Where does the model.users come from?

Sent with GitHawk

Model comes from here: https://github.com/rnystrom/GitHawk/blob/1c38ff4d5c600be43b6a25c77052ca7a58758705/Classes/Issues/IssueViewModels.swift#L26-L46

It gets the first three names fine, don't know why it would suddenly not get the rest

Ahh okay found it, so the GQL is limited to only 3 logins (correct) but the logic has been changed to switch on the users.count (which caps at 3) rather than model.count (which has no cap). Just need to change that ๐Ÿ˜„

OK so:

(lldb) po group.users.nodes?.count
โ–ฟ Optional<Int>
  - some : 3

(lldb) po group.users.totalCount
5

Aha! Why?!?! And how would you fix it then?

Ah wait, we never show more than 3 usernames. ๐Ÿ˜›

I still feel it should be the 3 latest, not the first 3 but yea - intentional

OK, so I found another bug, but it's probably not worth fixing. cc @Sherlouk

I removed my thumbs up in said comment, but the hover will still say "BasThomas, viktorgardart, Palleas and 1 other". ๐Ÿคทโ€โ™‚๏ธ

@BasThomas Raise it separately, should fix! ๐Ÿ˜„

Ah, it actually never updates locally. Bit trickier / more overkill when would technically have to do another network request in the scenario above, though.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rnystrom picture rnystrom  ยท  3Comments

BasThomas picture BasThomas  ยท  3Comments

viktorgardart picture viktorgardart  ยท  3Comments

rnystrom picture rnystrom  ยท  3Comments

rnystrom picture rnystrom  ยท  3Comments