diff options
Diffstat (limited to 'plugins/BasicHistory')
-rw-r--r-- | plugins/BasicHistory/src/BasicHistory.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index 550077b8b3..f625f727ea 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -74,13 +74,13 @@ void DeinitScheduler(); int DoLastTask(WPARAM, LPARAM);
INT_PTR ExecuteTaskService(WPARAM wParam, LPARAM lParam);
-int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
+int PrebuildContactMenu(WPARAM hContact, LPARAM lParam)
{
- int count = EventList::GetContactMessageNumber(wParam);
+ bool bHasHistory = db_event_last(hContact) != NULL;
bool isInList = HistoryWindow::IsInList(GetForegroundWindow());
- Menu_ShowItem(hContactMenu, count != 0);
- Menu_ShowItem(hDeleteContactMenu, count != 0 && isInList);
+ Menu_ShowItem(hContactMenu, bHasHistory);
+ Menu_ShowItem(hDeleteContactMenu, bHasHistory && isInList);
return 0;
}
|