Encapsulate TDLib state mutations
This commit is contained in:
@@ -104,11 +104,11 @@ rg -n "current_chat_messages_mut|chats_mut|folders_mut|pending_user_ids_mut|user
|
||||
|
||||
Steps:
|
||||
|
||||
- [ ] Add focused methods on `TdClient` for common mutations: update chat, update message by id, queue pending user, update user cache, update folders.
|
||||
- [ ] Replace raw `*_mut()` usage in helper/update modules with those methods.
|
||||
- [ ] Keep raw mutable access private to `TdClient` implementation where it is still needed.
|
||||
- [ ] Add or update tests around message updates, user-cache updates, and chat-list updates.
|
||||
- [ ] Run `cargo test --all-features`.
|
||||
- [x] Add focused methods on `TdClient` for common mutations: update chat, update message by id, queue pending user, update user cache, update folders.
|
||||
- [x] Replace raw `*_mut()` usage in helper/update modules with those methods.
|
||||
- [x] Keep raw mutable access private to `TdClient` implementation where it is still needed.
|
||||
- [x] Add or update tests around message updates, user-cache updates, and chat-list updates.
|
||||
- [x] Run `cargo test --all-features`.
|
||||
|
||||
Acceptance criteria:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user