Files
chatmail-core/src
Hocuri 69fbb98f3c api: Add Message::new_text() (#6123)
This adds a function to `Message`:

```rust
    pub fn new_text(text: String) -> Self {
        Message {
            viewtype: Viewtype::Text,
            text,
            ..Default::default()
        }
    }
```

I keep expecting that a function like this must exist and being
surprised that it doesn't.

Open question is whether it should be `pub` or `pub(crate)` - I made it
`pub` for now because it may be useful for others and we currently we
aren't thinking about the Rust API that much, anyway, but I can make it
`pub(crate)`, too (then it can't be used in deltachat-jsonrpc and
deltachat-repl).

I replaced some usages of Message::new(Viewtype::Text), but not all yet,
I'm going to do this in a follow-up, which will remove another around 65
LOC.
2024-10-29 16:22:52 +01:00
..
2024-10-21 21:35:03 +02:00
2024-09-13 17:58:25 +00:00
2024-09-08 07:08:12 +00:00
2024-05-05 21:23:32 +00:00
2024-10-29 16:22:52 +01:00
2024-07-26 23:57:21 +00:00
2024-10-22 09:43:36 +02:00
2024-09-16 17:00:16 +00:00
2024-09-12 00:22:09 +00:00
2024-09-12 00:22:09 +00:00
2024-09-13 17:58:25 +00:00
2023-08-25 23:04:47 +00:00
2024-10-21 21:35:03 +02:00
2024-08-29 20:59:41 +00:00
2024-10-21 21:35:03 +02:00
2023-07-09 14:06:45 +02:00
2024-09-20 22:38:28 +00:00