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

base: cache the computed display name and reuse that in the search filters #3516

Merged
merged 14 commits into from
Jun 11, 2024

Commits on Jun 6, 2024

  1. base: directly call calculate_room_name since it's a free-function

    Instead of calling it through `BaseRoomInfo::calculate_room_name`.
    bnjbvr committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    751ddd6 View commit details
    Browse the repository at this point in the history
  2. base: fix guessed number of members as it should relate to joined use…

    …rs, not joined+invited
    
    The previous code would use `ACTIVE` which means "either joined or
    invited" members, but the code thereafter considered this to be the
    number of joined members.
    
    Also replaced a call to `self.members()` (which does a lot of work under
    the hood) with a call to `self.joined_user_ids()`, since we only
    retrieve the `.len()` of the resulting vector.
    bnjbvr committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    8efcf4e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    cddc2b1 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    3221703 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0e075d3 View commit details
    Browse the repository at this point in the history
  6. base: make get_or_create_room async

    Since this is a good place where to recompute the cached display name at
    start.
    bnjbvr committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    60f5d8d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    4c790bd View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    256d7b3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    22911dd View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9021c18 View commit details
    Browse the repository at this point in the history
  11. base: rename computed_display_name to compute_display_name and remove…

    … computed_ in the cached one
    bnjbvr committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    823226a View commit details
    Browse the repository at this point in the history
  12. ci: fix flakeyness of test_room_notification_count in an innovative…

    … way
    
    The test looks at updates of `RoomInfo`s, but these depends on external
    factors like the server sending them in one part or multiple ones.
    
    Instead of trying to figure out which partial updates the server sent,
    wait for the stream of `RoomInfo`s to stabilize by trying to get the
    latest item from the stream, then wait up to N seconds for another item
    to show up, and continue as long as items come in.
    
    This should allow us to get rid of some code that was required to
    prevent flakey updates.
    bnjbvr committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    cd65997 View commit details
    Browse the repository at this point in the history

Commits on Jun 10, 2024

  1. base: don't regenerate the display name when creating a room, store t…

    …he cached display name in RoomInfo
    
    So revert a few changes to make some functions async, etc.
    bnjbvr committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    e96d932 View commit details
    Browse the repository at this point in the history
  2. base: move the initial filling of the display name cache into the syn…

    …c methods
    
    It's not perfect, but it's honest work.
    bnjbvr committed Jun 10, 2024
    Configuration menu
    Copy the full SHA
    5001b27 View commit details
    Browse the repository at this point in the history