diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2021-07-19 12:31:20 -0400 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2021-07-20 21:48:03 -0400 |
commit | 4384554587c3e9327382f2f9cbc36e893fbe4dab (patch) | |
tree | 6280af2fb8af90d4abc4d860d1a654096101bca0 /src | |
parent | Use standardized padding (diff) | |
download | nheko-4384554587c3e9327382f2f9cbc36e893fbe4dab.tar.xz |
Only invite if there is something/someone to invite
Diffstat (limited to 'src')
-rw-r--r-- | src/InviteesModel.cpp | 2 | ||||
-rw-r--r-- | src/InviteesModel.h | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/InviteesModel.cpp b/src/InviteesModel.cpp index 59054690..9b64f57c 100644 --- a/src/InviteesModel.cpp +++ b/src/InviteesModel.cpp @@ -22,6 +22,8 @@ InviteesModel::addUser(QString mxid) connect(invitee, &Invitee::userInfoLoaded, this, [this]() { endInsertRows(); }); invitees_.push_back(invitee); + + emit countChanged(); } QHash<int, QByteArray> diff --git a/src/InviteesModel.h b/src/InviteesModel.h index ac9208a0..a4e19ebb 100644 --- a/src/InviteesModel.h +++ b/src/InviteesModel.h @@ -30,6 +30,8 @@ class InviteesModel : public QAbstractListModel { Q_OBJECT + Q_PROPERTY(int count READ rowCount NOTIFY countChanged) + public: enum Roles { @@ -52,6 +54,7 @@ public: signals: void accept(); + void countChanged(); private: QVector<Invitee *> invitees_; |