Skip to content

Commit 858fba2

Browse files
lklimekCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 73447e5 commit 858fba2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/ui/dashpay/profile_screen.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,13 @@ impl ProfileScreen {
325325
);
326326
// No cached profile exists — queue an automatic network fetch
327327
// so the user doesn't have to manually click "Refresh".
328-
self.pending_action = Some(Box::new(self.trigger_load_profile()));
328+
if self.pending_action.is_none() {
329+
// Mark that we've already attempted to load a profile to
330+
// avoid repeatedly queuing the same work if this method
331+
// is called again before the pending action executes.
332+
self.profile_load_attempted = true;
333+
self.pending_action = Some(Box::new(self.trigger_load_profile()));
334+
}
329335
}
330336
Err(e) => {
331337
tracing::error!("Error loading profile from database: {}", e);

0 commit comments

Comments
 (0)