You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
809 B
31 lines
809 B
#pragma once |
|
|
|
#include <QWidget> |
|
#include <QStandardItemModel> |
|
#include <QHash> |
|
|
|
class ChatView; |
|
class InputBar; |
|
class EmojiPanel; |
|
class DbManager; |
|
|
|
class MessageList : public QWidget { |
|
Q_OBJECT |
|
public: |
|
explicit MessageList(DbManager* db = nullptr, QWidget *parent = nullptr); |
|
|
|
void loadChannel(const QString& channelId); |
|
void refresh(); |
|
void addMessage(const QString& channelId, quint64 authorNodeId, |
|
const QByteArray& content, qint64 timestamp); |
|
|
|
private: |
|
ChatView *m_view; |
|
QStandardItemModel *m_model; |
|
InputBar *m_inputBar; |
|
EmojiPanel *m_emojiPanel; |
|
DbManager *m_db; |
|
QString m_currentChannelId; |
|
bool m_animHoverActive = false; |
|
QHash<quint64, QColor> m_avatarCache; |
|
};
|
|
|