Room details: improve members count UX (#1050)

* Inject user id into room’s details

* Refactor member fetch logic in RoomDetailsScreenViewModel

* Refactor DI

* Fetch members in RoomMembersListScreenViewModel

* Fetch members in InviteUsersScreen

* Use joinedMembersCount in room members list

* Cleanup

* Limit members refresh

* Cleanup binding

* Fix UT build errors

* Fix RoomDetailsScreenViewModelTests

* Fix RoomMembersListScreenViewModelTests

* Fix UTs

* Fix RoomDetailsScreenUITests

* Refine RoomDetailsScreenViewModelTests

* Add roomProxy extension

* PR comments

* Refactor room’s counter to Int

* Improve updateMembers() performances

* Fix memory leaks
This commit is contained in:
Alfonso Grillo
2023-06-09 16:21:01 +02:00
committed by GitHub
parent 42e083dcaf
commit 63df68fd29
27 changed files with 368 additions and 292 deletions
@@ -27,7 +27,7 @@ protocol UserIndicatorControllerProtocol: CoordinatorProtocol {
extension UserIndicatorControllerProtocol {
/// Allows to submit a delayed indicator, this returns a Task so that it's also possible to cancel the action
func submitIndicator(_ indicator: UserIndicator, delay: Duration) -> Task<Void, Never> {
Task {
Task { @MainActor in
try? await Task.sleep(for: delay)
guard !Task.isCancelled else { return }
submitIndicator(indicator)