Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Members in Chat Inspector #153

Merged
merged 4 commits into from
Sep 19, 2022
Merged

Members in Chat Inspector #153

merged 4 commits into from
Sep 19, 2022

Conversation

levochkaa
Copy link
Collaborator

Added list of members of a chat to chat inspector

Some bugs when scrolling fast, .anchorPreference(key:value:transform:) might fix

@voltangle
Copy link
Collaborator

I have encountered some issues while testing this PR, which is when changing chats, the user list does not update, please fix it

@voltangle
Copy link
Collaborator

And also the user list update process introduces tremendous lag, probably related to fetching everything on the main thread

@voltangle voltangle added OS: all Related to all operating systems (macOS and iPadOS) enhancement New feature or request ux UX(User Experience) stuff labels Sep 17, 2022
@voltangle voltangle added this to the Stage 2: Media empire milestone Sep 17, 2022
@levochkaa
Copy link
Collaborator Author

I have encountered some issues while testing this PR, which is when changing chats, the user list does not update, please fix it

It was updating, but just adding list of users from new chat to an old one. Fixed it:

if isInitial {
    self.chatMembers = mappedUsers
} else {
    self.chatMembers += mappedUsers
}

@levochkaa
Copy link
Collaborator Author

And also the user list update process introduces tremendous lag, probably related to fetching everything on the main thread

hope it is fixed, i have removed fetching from the main thread to background

@voltangle
Copy link
Collaborator

Thanks for the fixes! I will test these changes later this day :)

@voltangle
Copy link
Collaborator

Just did the testing:

  1. A clear of the user list still does not work, that thing still thinks that it's in a previous chat
  2. Performance problems did go away, good job!
  3. Also, to fetch the next batch of users the user should do a large overscroll to make it fetch new users, which will definitely not work for folks with mouses, and is generally not that easy to use. I think it's better to fetch some time before reaching the end, so it doesn't feel as janky

@voltangle
Copy link
Collaborator

voltangle commented Sep 18, 2022

UPD: tried again, somehow it works differently now, but still broken

Now after changing a chat, the user list does not update at all, it just clears itself and doesn't fill up again

@voltangle
Copy link
Collaborator

Bruh I tried again and the behavior returned back to how it was lmao

@mock-foundation mock-foundation deleted a comment from ih3xcode Sep 18, 2022
@voltangle
Copy link
Collaborator

Tested the new update, now it works as expected! Kind of...
If I select a chat which is not a group, it will clear the entire list, as expected, but when I select a group again, it will not show a list of users from that chat, it will stay clear

@voltangle
Copy link
Collaborator

And, if you can, it will be really good if you will add support for updates from TDLib, which will make that list live, and make it update itself when data changes

@voltangle
Copy link
Collaborator

Fuck it, gonna YOLO it and do a merge

@voltangle voltangle merged commit 26fd2fe into mock-foundation:master Sep 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request OS: all Related to all operating systems (macOS and iPadOS) ux UX(User Experience) stuff
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants