diff options
author | Loren Burkholder <computersemiexpert@outlook.com> | 2020-12-25 09:14:00 -0500 |
---|---|---|
committer | Loren Burkholder <computersemiexpert@outlook.com> | 2021-09-11 19:35:31 -0400 |
commit | d2e193ff78c491f7108476b00340aea97f4feed3 (patch) | |
tree | 18fe17ffd6f1ad667b54fbc09d424658b25fb54c /src/timeline | |
parent | Merge pull request #722 from Thulinma/noHtmlFixes (diff) | |
download | nheko-d2e193ff78c491f7108476b00340aea97f4feed3.tar.xz |
Add jdenticon support
Diffstat (limited to 'src/timeline')
-rw-r--r-- | src/timeline/TimelineViewManager.cpp | 3 | ||||
-rw-r--r-- | src/timeline/TimelineViewManager.h | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/timeline/TimelineViewManager.cpp b/src/timeline/TimelineViewManager.cpp index 681cbe09..ea231b03 100644 --- a/src/timeline/TimelineViewManager.cpp +++ b/src/timeline/TimelineViewManager.cpp @@ -141,6 +141,7 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par , imgProvider(new MxcImageProvider()) , colorImgProvider(new ColorImageProvider()) , blurhashProvider(new BlurhashProvider()) + , jdenticonProvider(new JdenticonProvider()) , callManager_(callManager) , rooms_(new RoomlistModel(this)) , communities_(new CommunitiesModel(this)) @@ -310,6 +311,8 @@ TimelineViewManager::TimelineViewManager(CallManager *callManager, ChatPage *par view->engine()->addImageProvider("MxcImage", imgProvider); view->engine()->addImageProvider("colorimage", colorImgProvider); view->engine()->addImageProvider("blurhash", blurhashProvider); + if (JdenticonProvider::isAvailable()) + view->engine()->addImageProvider("jdenticon", jdenticonProvider); view->setSource(QUrl("qrc:///qml/Root.qml")); connect(parent, &ChatPage::themeChanged, this, &TimelineViewManager::updateColorPalette); diff --git a/src/timeline/TimelineViewManager.h b/src/timeline/TimelineViewManager.h index 4dd5e996..8991de55 100644 --- a/src/timeline/TimelineViewManager.h +++ b/src/timeline/TimelineViewManager.h @@ -18,6 +18,7 @@ #include "Cache.h" #include "CallManager.h" +#include "JdenticonProvider.h" #include "Logging.h" #include "TimelineModel.h" #include "Utils.h" @@ -141,6 +142,7 @@ private: MxcImageProvider *imgProvider; ColorImageProvider *colorImgProvider; BlurhashProvider *blurhashProvider; + JdenticonProvider *jdenticonProvider; CallManager *callManager_ = nullptr; |