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

Refactor ChatRepository.chats pagination to watch() changes from drift #1067

Merged
merged 33 commits into from
Jul 30, 2024

Conversation

SleepySquash
Copy link
Contributor

@SleepySquash SleepySquash commented Jul 17, 2024

Synopsis

Pagination needs a mechanism to receive real-time changes of items from drift provider instead.

Solution

Use watch() to listen to changes in SELECT of chats.

Checklist

  • Created PR:
    • In draft mode
    • Name contains issue reference
    • Has type and k:: labels applied
  • Before review:
    • Documentation is updated (if required)
    • Tests are updated (if required)
    • Changes conform code style
    • CHANGELOG entry is added (if required)
    • FCM (final commit message) is posted or updated
    • Draft mode is removed
  • Review is completed and changes are approved
    • FCM (final commit message) is approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • All temporary labels are removed

@SleepySquash SleepySquash added enhancement Improvement of existing features or bugfix k::refactor Refactor changes of existing code labels Jul 17, 2024
@SleepySquash SleepySquash added this to the 0.2.0 milestone Jul 17, 2024
@SleepySquash SleepySquash self-assigned this Jul 17, 2024
@SleepySquash
Copy link
Contributor Author

SleepySquash commented Jul 17, 2024

FCM

Refactor `ChatRepository.chats` pagination to `watch()` changes from `drift` (#1067)

- add `watchRecent()` and `watchFavorites()` to `ChatDriftProvider`
- refactor `chats` and `favorites` of `ChatRepository` to use `watch()` from `drift`

Additionally:
- add delay to `ResetAppHook` to ensure `drift` has closed its connections
- fix `DriftGraphQlPageProvider` missing dispose of its components

@SleepySquash SleepySquash marked this pull request as ready for review July 17, 2024 12:47
@SleepySquash SleepySquash merged commit 2ea40b8 into main Jul 30, 2024
26 checks passed
@SleepySquash SleepySquash deleted the refactor-chats-pagination branch July 30, 2024 09:53
github-actions bot added a commit that referenced this pull request Jul 30, 2024
…`drift` (#1067)

- add `watchRecent()` and `watchFavorites()` to `ChatDriftProvider`
- refactor `chats` and `favorites` of `ChatRepository` to use `watch()` from `drift`

Additionally:
- add delay to `ResetAppHook` to ensure `drift` has closed its connections
- fix `DriftGraphQlPageProvider` missing dispose of its components 2ea40b8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix k::refactor Refactor changes of existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant