Commit 894ce42722
Unsigned
Layout: unified · split
src/render.rs +5 −1
| @@ -18,6 +18,10 @@ pub(crate) trait RenderableEvent { | ||
| 18 | 18 | /// Convert the event into a string that will be displayed in the UI. |
| 19 | 19 | /// The displayname is taken as a parameter since it cannot be calculated from the event |
| 20 | 20 | /// context alone. |
| 21 | // TODO: This should probably also return tags instead just a string. | |
| 22 | // | |
| 23 | // Additionally, the render method should probably accept a RoomMember instead of a display | |
| 24 | // name. Then the sender method can be removed. | |
| 21 | 25 | fn render(&self, displayname: &str) -> String; |
| 22 | 26 | |
| 23 | 27 | /// Get the sender for this event this can be used to get the displayname. |
| @@ -215,7 +219,7 @@ macro_rules! has_formatted_body { | ||
| 215 | 219 | } |
| 216 | 220 | |
| 217 | 221 | /// This trait is implemented for message types that can contain either an URL or an encrypted |
| 218 | /// file. One of both _must_ be present. | |
| 222 | /// file. One of these _must_ be present. | |
| 219 | 223 | trait HasUrlOrFile { |
| 220 | 224 | fn url(&self) -> Option<&str>; |
| 221 | 225 | fn file(&self) -> Option<&str>; |