Resolved the bug about crash with an empty history chat
This commit is contained in:
parent
15342f3c53
commit
ff4124d1f0
3 changed files with 24 additions and 14 deletions
|
@ -77,24 +77,12 @@ public:
|
|||
Bulk
|
||||
};
|
||||
|
||||
enum Attachment {
|
||||
none,
|
||||
remote,
|
||||
downloading,
|
||||
uploading,
|
||||
ready
|
||||
};
|
||||
private:
|
||||
enum SyncState {
|
||||
incomplete,
|
||||
syncing,
|
||||
complete
|
||||
};
|
||||
struct Attach {
|
||||
Attachment state;
|
||||
qreal progress;
|
||||
QString localPath;
|
||||
};
|
||||
|
||||
//tags
|
||||
struct id {};
|
||||
|
@ -135,6 +123,20 @@ private:
|
|||
static const QHash<int, QByteArray> roles;
|
||||
};
|
||||
|
||||
enum Attachment {
|
||||
none,
|
||||
remote,
|
||||
downloading,
|
||||
uploading,
|
||||
ready
|
||||
};
|
||||
|
||||
struct Attach {
|
||||
Attachment state;
|
||||
qreal progress;
|
||||
QString localPath;
|
||||
};
|
||||
|
||||
struct FeedItem {
|
||||
QString text;
|
||||
QString sender;
|
||||
|
@ -143,10 +145,11 @@ struct FeedItem {
|
|||
bool correction;
|
||||
QDateTime date;
|
||||
Shared::Message::State state;
|
||||
MessageFeed::Attachment attach;
|
||||
Attach attach;
|
||||
};
|
||||
};
|
||||
|
||||
Q_DECLARE_METATYPE(Models::Attach);
|
||||
Q_DECLARE_METATYPE(Models::FeedItem);
|
||||
|
||||
#endif // MESSAGEFEED_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue