feat: do not add location markers to messages with non-POI location

This commit is contained in:
link2xt
2024-05-09 18:27:36 +00:00
parent 8a4dff2212
commit 72c09feb64
6 changed files with 22 additions and 18 deletions

View File

@@ -655,9 +655,11 @@ impl Message {
Ok(())
}
/// Check if a message has a location bound to it.
/// These messages are also returned by get_locations()
/// and the UI may decide to display a special icon beside such messages,
/// Check if a message has a POI location bound to it.
/// These locations are also returned by [`location::get_range()`].
/// The UI may decide to display a special icon beside such messages.
///
/// [`location::get_range()`]: crate::location::get_range
pub fn has_location(&self) -> bool {
self.location_id != 0
}