Add "Leave room" option.
This commit is contained in:
parent
c418c46f04
commit
22ad70cc49
|
@ -217,6 +217,10 @@ Item {
|
||||||
text: "Deprioritize"
|
text: "Deprioritize"
|
||||||
onTriggered: roomListMenu.room.isLowPriority ? roomListMenu.room.removeTag("m.lowpriority") : roomListMenu.room.addTag("m.lowpriority", "1")
|
onTriggered: roomListMenu.room.isLowPriority ? roomListMenu.room.removeTag("m.lowpriority") : roomListMenu.room.addTag("m.lowpriority", "1")
|
||||||
}
|
}
|
||||||
|
MenuItem {
|
||||||
|
text: "Leave Room"
|
||||||
|
onTriggered: listModel.connection.forgetRoom(roomListMenu.room.id)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#include "room.h"
|
#include "room.h"
|
||||||
#include "roomlistmodel.h"
|
#include "roomlistmodel.h"
|
||||||
|
|
||||||
|
#include "csapi/leaving.h"
|
||||||
|
|
||||||
using namespace QMatrixClient;
|
using namespace QMatrixClient;
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
|
@ -26,6 +28,9 @@ int main(int argc, char *argv[]) {
|
||||||
// QNetworkProxy::setApplicationProxy(proxy);
|
// QNetworkProxy::setApplicationProxy(proxy);
|
||||||
|
|
||||||
qRegisterMetaType<Room *>("Room*");
|
qRegisterMetaType<Room *>("Room*");
|
||||||
|
qRegisterMetaType<LeaveRoomJob *>("LeaveRoomJob*");
|
||||||
|
qRegisterMetaType<ForgetRoomJob *>("ForgetRoomJob*");
|
||||||
|
|
||||||
qRegisterMetaType<User *>("User*");
|
qRegisterMetaType<User *>("User*");
|
||||||
|
|
||||||
qmlRegisterType<Controller>("Matrique", 0, 1, "Controller");
|
qmlRegisterType<Controller>("Matrique", 0, 1, "Controller");
|
||||||
|
|
Loading…
Reference in New Issue