From fab0ad41fc5a614a3d9710e9dfc9ed7850fa34c3 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 12 Mar 2014 15:17:53 +0000 Subject: a contact has history when db_event_last <> NULL db_event_count might return 0 for subs git-svn-id: http://svn.miranda-ng.org/main/trunk@8581 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BasicHistory/src/BasicHistory.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'plugins') 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; } -- cgit v1.2.3