diff options
author | DeepBlueV7.X <nicolas.werner@hotmail.de> | 2020-03-05 21:07:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-05 21:07:18 +0000 |
commit | fc2f08a186c2712ae50891fa4f09fda91f6c3b19 (patch) | |
tree | f0048dc4af5ce5d62b9ab7e186d52c4baeed2047 /src/timeline/TimelineModel.cpp | |
parent | Merge pull request #131 from adasauce/shh (diff) | |
parent | Update mtxclient in flatpak for blurhash (diff) | |
download | nheko-fc2f08a186c2712ae50891fa4f09fda91f6c3b19.tar.xz |
Merge pull request #137 from Nheko-Reborn/blurhash
Experimental Blurhash support
Diffstat (limited to 'src/timeline/TimelineModel.cpp')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 2c03937a..e1d2e822 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -212,6 +212,7 @@ TimelineModel::roleNames() const {Timestamp, "timestamp"}, {Url, "url"}, {ThumbnailUrl, "thumbnailUrl"}, + {Blurhash, "blurhash"}, {Filename, "filename"}, {Filesize, "filesize"}, {MimeType, "mimetype"}, @@ -297,6 +298,8 @@ TimelineModel::data(const QString &id, int role) const return QVariant(QString::fromStdString(url(event))); case ThumbnailUrl: return QVariant(QString::fromStdString(thumbnail_url(event))); + case Blurhash: + return QVariant(QString::fromStdString(blurhash(event))); case Filename: return QVariant(QString::fromStdString(filename(event))); case Filesize: @@ -356,6 +359,7 @@ TimelineModel::data(const QString &id, int role) const m.insert(names[Timestamp], data(id, static_cast<int>(Timestamp))); m.insert(names[Url], data(id, static_cast<int>(Url))); m.insert(names[ThumbnailUrl], data(id, static_cast<int>(ThumbnailUrl))); + m.insert(names[Blurhash], data(id, static_cast<int>(Blurhash))); m.insert(names[Filename], data(id, static_cast<int>(Filename))); m.insert(names[Filesize], data(id, static_cast<int>(Filesize))); m.insert(names[MimeType], data(id, static_cast<int>(MimeType))); |