discourse/plugins/chat/app
Joffrey JAFFEUX 55ef2d0698
FIX: auto fill was not happening on first load (#21809)
This commit attempts to fix the case where the messages loaded initially don't fill the screen. It would prevent user to scroll and as a result to load more.

There are multiple fixes in this commit:
- the main fix is removing this code which was preventing the actual fill:

```javascript
        // prevents an edge case where user clicks bottom arrow
        // just after scrolling to top
        if (loadingPast && this.#isAtBottom()) {
          return;
        }
```

- ensures we always give a page site to the `chatApi.channel(...)` call if we have one, in the current state when `fetchFromLastRead` was `true` we would not set `args.page_size`
- ensures the `query_paginated_messages` is having a valid page size, which is not nil and not > `MAX_PAGE_SIZE`
- write a spec for the autofill, it was a challenging spec to write but it should give us the confidence we need here
2023-05-29 17:34:44 +02:00
..
controllers/chat DEV: Remove old ChatController routes for messages & lookup (#21723) 2023-05-29 09:37:10 +02:00
helpers/chat FEATURE: Mark all chat channels read with a shortcut (#20629) 2023-03-22 13:24:07 +10:00
jobs FIX: Don't autojoin users when they have ready-only permissions (#20213) 2023-05-10 08:45:13 -03:00
models FEATURE: Improving thread list item and header (#21749) 2023-05-29 09:11:55 +02:00
policies DEV: Add policy objects to services 2023-05-25 12:34:00 +02:00
queries/chat FIX: auto fill was not happening on first load (#21809) 2023-05-29 17:34:44 +02:00
serializers/chat DEV: Remove old ChatController routes for messages & lookup (#21723) 2023-05-29 09:37:10 +02:00
services DEV: Remove old ChatController routes for messages & lookup (#21723) 2023-05-29 09:37:10 +02:00
validators/chat DEV: properly namespace chat (#20690) 2023-03-17 14:24:38 +01:00
views