Add /join command support
This commit is contained in:
parent
ac525970b0
commit
76ddfb792b
9 changed files with 61 additions and 12 deletions
|
|
@ -54,6 +54,7 @@ signals:
|
|||
void close();
|
||||
void changeWindowTitle(const QString &msg);
|
||||
void unreadMessages(int count);
|
||||
void showNotification(const QString &msg);
|
||||
|
||||
private slots:
|
||||
void showUnreadMessageNotification(int count);
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#include "MatrixClient.h"
|
||||
#include "OverlayModal.h"
|
||||
#include "RegisterPage.h"
|
||||
#include "SnackBar.h"
|
||||
#include "TrayIcon.h"
|
||||
#include "WelcomePage.h"
|
||||
|
||||
|
|
@ -91,4 +92,7 @@ private:
|
|||
|
||||
// Tray icon that shows the unread message count.
|
||||
TrayIcon *trayIcon_;
|
||||
|
||||
// Notifications display.
|
||||
QSharedPointer<SnackBar> snackBar_;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ signals:
|
|||
void initialSyncCompleted(const SyncResponse &response);
|
||||
void syncCompleted(const SyncResponse &response);
|
||||
void syncFailed(const QString &msg);
|
||||
void joinFailed(const QString &msg);
|
||||
void messageSent(const QString &event_id, const QString &roomid, const int txn_id);
|
||||
void emoteSent(const QString &event_id, const QString &roomid, const int txn_id);
|
||||
void messagesRetrieved(const QString &room_id, const RoomMessages &msgs);
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
namespace msgs = matrix::events::messages;
|
||||
|
||||
static const QString EMOTE_COMMAND("/me ");
|
||||
static const QString JOIN_COMMAND("/join ");
|
||||
|
||||
class FilteredTextEdit : public QTextEdit
|
||||
{
|
||||
|
|
@ -63,10 +64,12 @@ signals:
|
|||
void sendTextMessage(QString msg);
|
||||
void sendEmoteMessage(QString msg);
|
||||
void uploadImage(QString filename);
|
||||
void sendJoinRoomRequest(const QString &room);
|
||||
|
||||
private:
|
||||
void showUploadSpinner();
|
||||
QString parseEmoteCommand(const QString &cmd);
|
||||
QString parseJoinCommand(const QString &cmd);
|
||||
|
||||
QHBoxLayout *topLayout_;
|
||||
FilteredTextEdit *input_;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue