fix labels crash
This commit is contained in:
parent
f4ee8ed8c8
commit
ff7e527399
@ -34,6 +34,11 @@ QList<Message> LabelsNode::undeletedMessages() const {
|
||||
|
||||
int LabelsNode::countOfUnreadMessages() const {
|
||||
auto chi = childItems();
|
||||
|
||||
if (chi.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return boolinq::from(chi)
|
||||
.max([](RootItem* it) {
|
||||
return it->countOfUnreadMessages();
|
||||
@ -43,6 +48,11 @@ int LabelsNode::countOfUnreadMessages() const {
|
||||
|
||||
int LabelsNode::countOfAllMessages() const {
|
||||
auto chi = childItems();
|
||||
|
||||
if (chi.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return boolinq::from(chi)
|
||||
.max([](RootItem* it) {
|
||||
return it->countOfAllMessages();
|
||||
|
Loading…
x
Reference in New Issue
Block a user