room-history: Fix width of locations in replies
This commit is contained in:
parent
19d5f87e48
commit
97933849f4
1 changed files with 8 additions and 4 deletions
|
@ -89,13 +89,11 @@ impl MessageLocation {
|
|||
|
||||
pub fn set_geo_uri(&self, uri: &str, format: ContentFormat) {
|
||||
let priv_ = self.imp();
|
||||
let compact = matches!(format, ContentFormat::Compact | ContentFormat::Ellipsized);
|
||||
priv_.location.set_compact(compact);
|
||||
|
||||
match GeoUri::parse(uri) {
|
||||
Ok(geo_uri) => {
|
||||
priv_.location.set_compact(matches!(
|
||||
format,
|
||||
ContentFormat::Compact | ContentFormat::Ellipsized
|
||||
));
|
||||
priv_.location.set_location(&geo_uri);
|
||||
priv_.overlay_error.hide();
|
||||
}
|
||||
|
@ -108,5 +106,11 @@ impl MessageLocation {
|
|||
priv_.overlay_error.show();
|
||||
}
|
||||
};
|
||||
|
||||
if compact {
|
||||
self.set_halign(gtk::Align::Start);
|
||||
} else {
|
||||
self.set_halign(gtk::Align::Fill);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue