ActivityWidget: Make sure Notification are visible if Activity disabled

This is the fix for #4651
This commit is contained in:
Klaas Freitag 2016-04-11 15:39:25 +02:00
parent 2ec642aadb
commit e896d16f32

View file

@ -159,7 +159,14 @@ void ActivityWidget::slotAccountActivityStatus(AccountState *ast, int statusCode
}
int accountCount = AccountManager::instance()->accounts().count();
emit hideAcitivityTab(_accountsWithoutActivities.count() == accountCount);
// hide the activity pane in case there are no accounts enabled.
if( _accountsWithoutActivities.count() == accountCount ) {
_ui->_headerLabel->hide();
_ui->_activityList->hide();
}
emit hideAcitivityTab(_accountsWithoutActivities.count() == accountCount
&& _widgetForNotifId.count() == 0 ); // do not hide if there are notifications
showLabels();
}
@ -323,6 +330,8 @@ void ActivityWidget::slotBuildNotificationDisplay(const ActivityList& list)
scheduleWidgetToRemove(widgetToGo, 0);
}
emit hideAcitivityTab(false);
_ui->_notifyLabel->setHidden( _widgetForNotifId.isEmpty() );
_ui->_notifyScroll->setHidden( _widgetForNotifId.isEmpty() );