mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-26 05:34:34 +00:00
fix show notify
This commit is contained in:
parent
6359c79833
commit
08824c8e61
@ -28,6 +28,9 @@ Item {
|
||||
}
|
||||
|
||||
onMsgChanged: {
|
||||
notyfyView._show();
|
||||
|
||||
if (msg.isValid()) {
|
||||
notyfyView._show();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user