mirror of
https://github.com/mikedilger/gossip.git
synced 2024-09-29 00:11:01 +00:00
egui upgrade: Fix hover detection for "viewed" notes
This commit is contained in:
parent
d514e3f7e9
commit
6806d56f7f
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user