egui upgrade: Fix hover detection for "viewed" notes

This commit is contained in:
Bu5hm4nn 2024-07-23 08:13:53 +02:00
parent d514e3f7e9
commit 6806d56f7f

View File

@ -160,7 +160,16 @@ pub(super) fn render_note(
}
// Mark post as viewed if hovered AND we are not scrolling
if !viewed && inner_response.response.hovered() && !app.is_scrolling() {
if !viewed
&& ui
.interact(
inner_response.response.rect,
ui.next_auto_id().with("hov"),
egui::Sense::hover(),
)
.hovered()
&& !app.is_scrolling()
{
let _ = GLOBALS.storage.mark_event_viewed(id, None);
}