mirror of
https://gitlab.com/mysocialportal/relatica
synced 2024-10-18 10:03:31 +00:00
Merge branch 'main' into bluesky-reshare-update
This commit is contained in:
commit
3e5ae5178a
6 changed files with 60 additions and 19 deletions
16
CHANGELOG.md
16
CHANGELOG.md
|
@ -4,13 +4,23 @@
|
|||
|
||||
* Changes
|
||||
* Use the network data in the friendica extensions rather than the application data if available since the app data
|
||||
is the app name.
|
||||
is the app name. ([Feature #106](https://gitlab.com/mysocialportal/relatica/-/issues/106))
|
||||
* Fixes
|
||||
* Fixes final column of network settings getting chopped off on smaller
|
||||
screens ([Issue #102](https://gitlab.com/mysocialportal/relatica/-/issues/102))
|
||||
* Only circles now appear in the Profile view for adding users to a circle. Previously groups and channels showed up
|
||||
there too which was nonsensical. ([Issue #103](https://gitlab.com/mysocialportal/relatica/-/issues/103))
|
||||
* Fix broken embedded images in message HTML when servers are running block post post-Friendica
|
||||
2024.08.([Issue #105](https://gitlab.com/mysocialportal/relatica/-/issues/105))
|
||||
* Fix broken Diaspora links when using "Copy URL" or "Open in
|
||||
Browser".([Issue #109](https://gitlab.com/mysocialportal/relatica/-/issues/109))
|
||||
* New Features
|
||||
* Focus Mode with ability to set duration and difficulty for unlocking beforehand. Focus mode in this release shows
|
||||
only the "My Posts" timeline and no bottom navigation bar. So one can't get to search, notifications,
|
||||
contacts, etc. One can create new posts, comments, and edits to those things though.
|
||||
* Shows the Circles, Groups, and Channels timelines if connected to a Friendica server running 2024.08 or later.
|
||||
contacts, etc. One can create new posts, comments, and edits to those things
|
||||
though. ([Feature #95](https://gitlab.com/mysocialportal/relatica/-/issues/95))
|
||||
* Shows the Circles, Groups, and Channels timelines if connected to a Friendica server running 2024.08 or
|
||||
later.([Feature #108](https://gitlab.com/mysocialportal/relatica/-/issues/108))
|
||||
* Add resharing of Bluesky posts if connected to a Friendica server running 2024.08 or later.
|
||||
|
||||
## Version 0.11.0 (beta)
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
import 'dart:async';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
|
||||
import 'package:html/dom.dart' as dom;
|
||||
|
||||
import '../globals.dart';
|
||||
|
||||
const _emojiSize = {'width': '20px', 'height': '20px', 'margin-left': '-3px'};
|
||||
|
||||
class HtmlTextViewerControl extends StatelessWidget {
|
||||
|
@ -17,6 +20,7 @@ class HtmlTextViewerControl extends StatelessWidget {
|
|||
Widget build(BuildContext context) {
|
||||
return HtmlWidget(
|
||||
content,
|
||||
factoryBuilder: () => MyWidgetFactory(),
|
||||
customStylesBuilder: _defaultStylesBuilder,
|
||||
onTapUrl: onTapUrl,
|
||||
);
|
||||
|
@ -30,3 +34,28 @@ class HtmlTextViewerControl extends StatelessWidget {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class MyWidgetFactory extends WidgetFactory {
|
||||
@override
|
||||
Widget? buildImageWidget(BuildMetadata meta, ImageSource src) {
|
||||
final url = src.url;
|
||||
if (!url.startsWith(RegExp('https?://'))) {
|
||||
return super.buildImageWidget(meta, src);
|
||||
}
|
||||
|
||||
Map<String, String> headers = {'user-agent': userAgent};
|
||||
|
||||
return CachedNetworkImage(
|
||||
httpHeaders: headers,
|
||||
errorWidget: (context, _, error) =>
|
||||
onErrorBuilder(context, meta, error, src) ?? widget0,
|
||||
fit: BoxFit.fill,
|
||||
imageUrl: url,
|
||||
progressIndicatorBuilder: (context, _, progress) {
|
||||
final t = progress.totalSize;
|
||||
final v = t != null && t > 0 ? progress.downloaded / t : null;
|
||||
return onLoadingBuilder(context, meta, v, src) ?? widget0;
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -229,14 +229,20 @@ class NetworkCapabilitiesWidget extends StatelessWidget {
|
|||
),
|
||||
],
|
||||
),
|
||||
subtitle: DataTable(
|
||||
columns: const [
|
||||
DataColumn(label: Text('Network')),
|
||||
DataColumn(label: Text('React')),
|
||||
DataColumn(label: Text('Reshare')),
|
||||
DataColumn(label: Text('Comment')),
|
||||
],
|
||||
rows: rows,
|
||||
subtitle: SingleChildScrollView(
|
||||
scrollDirection: Axis.horizontal,
|
||||
child: DataTable(
|
||||
columnSpacing: 10.0,
|
||||
columns: const [
|
||||
DataColumn(
|
||||
label: Text('Network'),
|
||||
),
|
||||
DataColumn(label: Text('React')),
|
||||
DataColumn(label: Text('Reshare')),
|
||||
DataColumn(label: Text('Comment')),
|
||||
],
|
||||
rows: rows,
|
||||
),
|
||||
));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,7 +6,6 @@ import '../../models/engagement_summary.dart';
|
|||
import '../../models/link_data.dart';
|
||||
import '../../models/location_data.dart';
|
||||
import '../../models/timeline_entry.dart';
|
||||
import '../../models/timeline_network_info.dart';
|
||||
import '../../models/visibility.dart';
|
||||
import '../../services/auth_service.dart';
|
||||
import '../../services/connections_manager.dart';
|
||||
|
@ -107,10 +106,7 @@ extension TimelineEntryMastodonExtensions on TimelineEntry {
|
|||
|
||||
const title = '';
|
||||
final spoilerText = json['spoiler_text'] ?? '';
|
||||
final externalLink = switch (networkInfo.network) {
|
||||
KnownNetworks.bluesky || KnownNetworks.threads => json['url'] ?? '',
|
||||
_ => json['uri'] ?? '',
|
||||
};
|
||||
final externalLink = json['url'];
|
||||
const actualLocationData = LocationData();
|
||||
|
||||
final modificationTimestamp = timestamp;
|
||||
|
|
|
@ -556,10 +556,10 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_widget_from_html_core
|
||||
sha256: df7c7c9e5ea144f7ab0adfbad733b4d4f7d408ab733c94e6e9fdcb327af92aa1
|
||||
sha256: b1048fd119a14762e2361bd057da608148a895477846d6149109b2151d2f7abf
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "0.15.1"
|
||||
version: "0.15.2"
|
||||
freezed_annotation:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
|
|
@ -24,7 +24,7 @@ dependencies:
|
|||
flutter_secure_storage: ^9.2.2
|
||||
flutter_svg: ^2.0.10+1
|
||||
flutter_web_auth_2: ^3.1.2
|
||||
flutter_widget_from_html_core: ^0.15.1
|
||||
flutter_widget_from_html_core: ^0.15.2
|
||||
get_it: ^7.7.0
|
||||
get_it_mixin: ^4.2.2
|
||||
go_router: ^14.1.2
|
||||
|
|
Loading…
Reference in a new issue