Handle absent media and selection state safely
This commit is contained in:
@@ -169,12 +169,12 @@ rg -n "unwrap\\(|expect\\(|panic!\\(" src
|
||||
|
||||
Steps:
|
||||
|
||||
- [ ] Replace `photo_info().unwrap()` and `voice_info().unwrap()` with `let Some(...) else { ... }`.
|
||||
- [ ] Replace `selected_chat_id.unwrap()` with an early return or status message.
|
||||
- [ ] Review playback/message unwraps in `message_bubble.rs` and convert absent data into graceful UI fallback.
|
||||
- [ ] Audit mutex unwraps separately; leave only cases where poisoning should be fatal and documented by context.
|
||||
- [ ] Add tests for missing media metadata and absent selected chat.
|
||||
- [ ] Run `cargo clippy --all-targets --all-features -- -D warnings`.
|
||||
- [x] Replace `photo_info().unwrap()` and `voice_info().unwrap()` with `let Some(...) else { ... }`.
|
||||
- [x] Replace `selected_chat_id.unwrap()` with an early return or status message.
|
||||
- [x] Review playback/message unwraps in `message_bubble.rs` and convert absent data into graceful UI fallback.
|
||||
- [x] Audit mutex unwraps separately; leave only cases where poisoning should be fatal and documented by context.
|
||||
- [x] Add tests for missing media metadata and absent selected chat.
|
||||
- [x] Run `cargo clippy --all-targets --all-features -- -D warnings`.
|
||||
|
||||
Acceptance criteria:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user