Rocket.Chat.iOS icon indicating copy to clipboard operation
Rocket.Chat.iOS copied to clipboard

[BUG] Users list is wrong when I search users.

Open JoyWang1010 opened this issue 7 years ago • 8 comments

  • Your Rocket.Chat app version: 3.2.0(223)
  • Your Rocket.Chat server version: 0.73.2
  • Device (or Simulator) you're running with: iPhone XR (iOS 12.1)

Users list is wrong when I search users. Maybe DifferenceKit method update tableView error. I found elementDeleted and elementUpdated method updated datasource not correctly.

wechatimg27

JoyWang1010 avatar Jan 14 '19 10:01 JoyWang1010

@CoderJoyWang What's wrong about the list? Could you explain?

rafaelks avatar Jan 14 '19 11:01 rafaelks

hi...we could notice that i inputed letters "l"and"v", the result of the list contains "11122211212","18new", i thought these results should not be correct...

JoyWang1010 avatar Jan 14 '19 11:01 JoyWang1010

@CoderJoyWang Search also looks for the user's name and email... aren't any of these fields related to this user?

rafaelks avatar Jan 14 '19 11:01 rafaelks

hi, i have tested on my server.... i 've got the same problem...

JoyWang1010 avatar Jan 14 '19 11:01 JoyWang1010

2019-01-14 7 50 21 i thought that this method `let changes = StagedChangeset(source: oldValue, target: newValue)` may cause the error

JoyWang1010 avatar Jan 14 '19 11:01 JoyWang1010

I did found that this method let changes = StagedChangeset(source: oldValue, target: newValue) cause the error. This method callback a wrong instance changes sometimes... And I fix it with reload tableview datasource . I think that you can fix it better.

2019-01-15 2 29 45 2019-01-15 2 30 46

JoyWang1010 avatar Jan 15 '19 06:01 JoyWang1010

@rafaelks
2019-01-17 10 29 45

i think i have found the key of this bug.... when method tableView.reload(using: changes, with: .fade, updateRows has been called the indexpath is not correct as i expected....it seems that indexpath has referred to the old value of datasource which not map the current tabbleview datasource.....

JoyWang1010 avatar Jan 17 '19 02:01 JoyWang1010

simulator screen shot - iphone x - 2019-01-17 at 10 44 26

JoyWang1010 avatar Jan 17 '19 02:01 JoyWang1010