Skip to content

Commit

Permalink
Trade ThumbnailProvider for NAM's mxc support
Browse files Browse the repository at this point in the history
With libQuotient 0.9 NAM can handle mxc links (almost) natively, so we
don't need to use an image provider neither for avatars (dropped
earlier), nor for image thumbnails.
  • Loading branch information
KitsuneRal committed Nov 25, 2024
1 parent aa739a6 commit 54958f3
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 199 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ add_executable(${PROJECT_NAME} WIN32 MACOSX_BUNDLE)
target_sources(${PROJECT_NAME} PRIVATE
client/quaternionroom.cpp client/quaternionroom.h
client/htmlfilter.cpp client/htmlfilter.h
client/thumbnailprovider.cpp client/thumbnailprovider.h
client/activitydetector.cpp client/activitydetector.h
client/dialog.cpp client/dialog.h
client/logindialog.cpp client/logindialog.h
Expand Down
2 changes: 1 addition & 1 deletion client/qml/TimelineItem.qml
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ Item {
: progressInfo.failed
? ""
: content?.info.thumbnail_info && !autoload
? "image://thumbnail/" + content.thumbnailMediaId
? room.makeMediaUrl(eventId, content.info.thumbnail_url)
: ""
maxHeight: chatView.height - textField.height -
authorLabel.height * !settings.timelineStyleIsXChat
Expand Down
181 changes: 0 additions & 181 deletions client/thumbnailprovider.cpp

This file was deleted.

15 changes: 0 additions & 15 deletions client/thumbnailprovider.h

This file was deleted.

1 change: 0 additions & 1 deletion client/timelinewidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ TimelineWidget::TimelineWidget(ChatRoomWidget* chatRoomWidget)

setResizeMode(SizeRootObjectToView);

engine()->addImageProvider("thumbnail"_ls, makeThumbnailProvider(this));
engine()->setNetworkAccessManagerFactory(&namFactory);

auto* ctxt = rootContext();
Expand Down

0 comments on commit 54958f3

Please sign in to comment.