Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/sip/NumberStats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ QStringList NumberStats::mostCalled(quint8 limit, bool includeFavorites) const
}
} else {
for (const auto *countObj : std::as_const(m_callCounts)) {
if (m_favoriteLookup.contains(countObj->phoneNumber)) {
if (!m_favoriteLookup.contains(countObj->phoneNumber)) {
result.append(countObj->phoneNumber);
}

Expand Down
11 changes: 8 additions & 3 deletions src/ui/SystemTrayMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,14 @@ void SystemTrayMenu::updateMostCalled()
m_mostCalledActions.reserve(mostCalled.size());

for (const auto &number : mostCalled) {
const auto &numStat = *(NumberStats::instance().numberStat(number));
auto action = new QAction(QIcon::fromTheme(contactIcon(numStat)), contactText(numStat),
m_trayIconMenu);
const auto numStat = NumberStats::instance().numberStat(number);
QAction *action = nullptr;
if (numStat) {
action = new QAction(QIcon::fromTheme(contactIcon(*numStat)), contactText(*numStat),
m_trayIconMenu);
} else {
action = new QAction(QString("⚫ %2").arg(number), m_trayIconMenu);
Comment thread
cajus marked this conversation as resolved.
}
m_trayIconMenu->insertAction(m_mostCalledSeparator, action);
m_mostCalledActions.insert(number, action);
connect(action, &QAction::triggered, this,
Expand Down
Loading