Skip to content

Commit dc9d1cf

Browse files
committed
[WARP] Do a partial update of the sidebar UI when navigating instead of a full update
Reduces unnecessary work
1 parent 39cc8da commit dc9d1cf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

plugins/warp/ui/plugin.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,12 @@ WarpSidebarWidget::WarpSidebarWidget(BinaryViewRef data) : SidebarWidget("WARP")
174174

175175
m_fetcher = WarpFetcher::Global();
176176
m_callbackId = m_fetcher->AddCompletionCallback([this]() {
177-
ExecuteOnMainThread([this]() { Update(); });
177+
ExecuteOnMainThread([this]() {
178+
// Instead of doing a full update after fetching, we only want to make sure the current function has
179+
// up-to-date matches, since the other two tabs (all matches, container list) do not get populated with
180+
// additional information or manage their own updates (e.g. container source list).
181+
m_currentFunctionWidget->UpdateMatches();
182+
});
178183
return KeepCallback;
179184
});
180185

0 commit comments

Comments
 (0)