mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-18 13:33:32 +00:00
Add filter that takes care of mastodon posts with link preview having duplicate images
This commit is contained in:
parent
b13b66ec48
commit
f03d8d7f52
2 changed files with 16 additions and 0 deletions
|
@ -127,6 +127,14 @@ class _SearchResultStatusControlState extends State<SearchResultStatusControl> {
|
||||||
if (items.isEmpty) {
|
if (items.isEmpty) {
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A Link Preview with only one media attachment will have a duplicate image
|
||||||
|
// even though it points to different resources server side. So we don't
|
||||||
|
// want to render it twice.
|
||||||
|
if (widget.status.linkPreviewData != null && items.length == 1) {
|
||||||
|
return const SizedBox();
|
||||||
|
}
|
||||||
|
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: 250.0,
|
height: 250.0,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
|
|
|
@ -228,6 +228,14 @@ class _StatusControlState extends State<FlattenedTreeEntryControl> {
|
||||||
if (items.isEmpty) {
|
if (items.isEmpty) {
|
||||||
return const SizedBox();
|
return const SizedBox();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A Link Preview with only one media attachment will have a duplicate image
|
||||||
|
// even though it points to different resources server side. So we don't
|
||||||
|
// want to render it twice.
|
||||||
|
if (entry.linkPreviewData != null && items.length == 1) {
|
||||||
|
return const SizedBox();
|
||||||
|
}
|
||||||
|
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
height: ResponsiveSizesCalculator(context).maxThumbnailHeight,
|
height: ResponsiveSizesCalculator(context).maxThumbnailHeight,
|
||||||
child: ListView.separated(
|
child: ListView.separated(
|
||||||
|
|
Loading…
Reference in a new issue