fix show notify

This commit is contained in:
Andrei Yankovich 2019-11-20 17:54:52 +03:00
parent 6359c79833
commit 08824c8e61
3 changed files with 9 additions and 1 deletions

View File

@ -28,6 +28,9 @@ Item {
}
onMsgChanged: {
notyfyView._show();
if (msg.isValid()) {
notyfyView._show();
}
}
}

View File

@ -37,4 +37,8 @@ bool NotificationData::operator !=(const NotificationData &righ) {
int NotificationData::type() const {
return _type;
}
bool NotificationData::isValid() const {
return _text.size() || _title.size() || _img.size();
}
}

View File

@ -37,6 +37,7 @@ public:
Q_INVOKABLE QString img() const;
Q_INVOKABLE QString title() const;
Q_INVOKABLE int type() const;
Q_INVOKABLE bool isValid() const;
bool operator ==(const NotificationData &righ);
bool operator !=(const NotificationData &righ);