summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLoren Burkholder <computersemiexpert@outlook.com>2021-07-19 12:31:20 -0400
committerLoren Burkholder <computersemiexpert@outlook.com>2021-07-20 21:48:03 -0400
commit4384554587c3e9327382f2f9cbc36e893fbe4dab (patch)
tree6280af2fb8af90d4abc4d860d1a654096101bca0 /src
parentUse standardized padding (diff)
downloadnheko-4384554587c3e9327382f2f9cbc36e893fbe4dab.tar.xz
Only invite if there is something/someone to invite
Diffstat (limited to 'src')
-rw-r--r--src/InviteesModel.cpp2
-rw-r--r--src/InviteesModel.h3
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_;