Merge branch 'main' into codemagic-setup

This commit is contained in:
Hank Grabowski 2024-06-20 21:32:42 -04:00
commit 5649d4ac42
21 changed files with 173 additions and 76 deletions

View file

@ -1,64 +1,95 @@
# Relatica Change Log
## Version 0.10.1 (beta)
* Changes
* Adds Relatica User Agent string to API requests so that Friendica servers running >2023.06
with blockbot enabled will allow requests.
* Adds version string to the settings screen to help users identify version installed
## Version 0.10.0 (beta)
* Changes
* Add user count in the Circles Management screen
## Version 0.9.0 (beta)
* Changes
* Sign in screen has a better flow and layout to make it less confusing
* Notifications screen has a cleaner look when no notifications exist
* Timeline screens have a cleaner look when no posts exist
* Clicking anywhere on a post/comment in the status search results will open post. The "Go To Post/Comment" menu
* Clicking anywhere on a post/comment in the status search results will open post. The "Go To
Post/Comment" menu
option is still there.
* Drag down to refresh timeline will clear and reload the timeline from scratch after a warning.
* Fixes
* Search screen bug with initial search not updating screen correctly addressed
* Multiple images showing up for the same post has been fixed for D* reshares and ActivityPub posts with link
* Multiple images showing up for the same post has been fixed for D* reshares and ActivityPub
posts with link
previews.
that embedded the same image as an image attachment.
* Capitalization in ALT Text field editors should be sentence now.
* Maximum thread rendering depth is set to 5.
* New Features
* When a user clicks on a tag in a post it opens the search onto their local server not the original post/comment's
* When a user clicks on a tag in a post it opens the search onto their local server not the
original post/comment's
server
* Log entry viewer screen with ability to filter, export individual entries, or the entire table to a JSON file for
* Log entry viewer screen with ability to filter, export individual entries, or the entire table
to a JSON file for
helping with debugging.
## Version 0.8.0 (beta)
* Changes
* "Groups" have been renamed "Circles" to match the upcoming Friendica release nomenclature change.
* Timeline selector has now been merged into one big list with a divider between the standard types and the circles
* User Profile screen buttons have been rearranged so that (un)block and (un)follow are on their own line
* "Groups" have been renamed "Circles" to match the upcoming Friendica release nomenclature
change.
* Timeline selector has now been merged into one big list with a divider between the standard
types and the circles
* User Profile screen buttons have been rearranged so that (un)block and (un)follow are on their
own line
* Notifications processing has been streamlined again, especially for older notifications
* Contacts information is updated as the data comes in (may need to pull this out since it can temporarily show
* Contacts information is updated as the data comes in (may need to pull this out since it can
temporarily show
incorrect connection information before the followers mapping occurs)
* Link preview has a new more efficient layout with the photo on top and the text caption underneath
* Link preview has a new more efficient layout with the photo on top and the text caption
underneath
* Sign-in screen has been changed to be more user-friendly
* Start-up splash screen has more prompts to let users know what is happening and timeouts when trying to
communicate with the servers. If nothing is logged in it drops to the sign in screen rather than staying on splash
* Start-up splash screen has more prompts to let users know what is happening and timeouts when
trying to
communicate with the servers. If nothing is logged in it drops to the sign in screen rather
than staying on splash
screen.
* Streamlined the visibility selection in the post/comment editor
* Interactions toolbar has been streamlined. Navigating to the screen with details on who liked/reshared etc. is now
in menu and clicking in any free space in the post card area (except around images/videos since that is
* Interactions toolbar has been streamlined. Navigating to the screen with details on who
liked/reshared etc. is now
in menu and clicking in any free space in the post card area (except around images/videos
since that is
technically part of a media carousel control).
* When saving images on mobile it writes to the photo gallery than the files area.
* Fixes
* Adding/removing of users from Circles properly reflects on profile screen (before needed to navigate away and back
* Adding/removing of users from Circles properly reflects on profile screen (before needed to
navigate away and back
to get it to appear)
* Multiclicking on notifications will not cause multiple navigations to that post/comment
* Multiclicking on post/comment creation will not cause multiple creation events
* Loading newer notifications works.
* Changing profiles when on the Contacts or Search screen now properly reflect the change
* Fix privacy levels on response to Mastodon direct messages. Previously it would expand the privacy to include
* Fix privacy levels on response to Mastodon direct messages. Previously it would expand the
privacy to include
followers
* Image/video size in post/comment viewer doesn't overflow the boundaries of the card
* Unresharing a post doesn't cause it to disappear
* Image viewer screen has better fill and image text appears after clicking ALT button rather than as a caption
* Resharing of comments in Friendica is spotty through the UI and even more so through the API. It has been removed
* Image viewer screen has better fill and image text appears after clicking ALT button rather
than as a caption
* Resharing of comments in Friendica is spotty through the UI and even more so through the API.
It has been removed
for the time being
* PNG images always displayed very low res thumbnails that Friendica generates. PNGs now always load the full size
* PNG images always displayed very low res thumbnails that Friendica generates. PNGs now always
load the full size
image, for previews and full views
* New Features
* Can click on the visibility icon on posts to get a dialog box listing the visibility of the post/comment
* Can click on the visibility icon on posts to get a dialog box listing the visibility of the
post/comment
## Version 0.7.2 (beta)

View file

@ -6,12 +6,12 @@ For more information about the current beta testing program
# Latest Binaries:
* Android v0.9.0 Is available by invitation through Play Store beta (please see me for access)
or [this self-installable ZIP file](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.9.0/relatica_v0.9.0.apk.zip)
* iPhone/iPad v0.9.0: This is only available through TestFlight. Please contact me for access.
* [Windows (Intel) v0.9.0](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.9.0/relatica_v0.9.0_win_x64.zip)
* macOS v0.9.0:This is only available through TestFlight. Please contact me for access.
* [Linux v0.9.0 (tested on Ubuntu 20 and 22)](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.9.0/relatica_v0.9.0_linux_x64.zip)
* Android v0.10.1 Is available by invitation through Play Store beta (please see me for access)
or [this self-installable ZIP file](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.10.1/relatica_v0.10.1.apk.zip)
* iPhone/iPad v0.10.1: This is only available through TestFlight. Please contact me for access.
* [Windows (Intel) v0.10.1](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.10.1/relatica_v0.10.1_win_x64.zip)
* macOS v0.10.1:This is only available through TestFlight. Please contact me for access.
* [Linux v0.10.1 (tested on Ubuntu 20 and 22)](https://mysocialportal-relatica.nyc3.cdn.digitaloceanspaces.com/v0.10.1/relatica_v0.10.1_linux_x64.zip)
## Mobile

View file

@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>

View file

@ -166,7 +166,7 @@ SPEC CHECKSUMS:
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
file_picker: 15fd9539e4eb735dc54bae8c0534a7a9511a03de
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
flutter_file_dialog: 4c014a45b105709a27391e266c277d7e588e9299
flutter_secure_storage: 23fc622d89d073675f2eaa109381aefbcf5a49be
flutter_web_auth_2: 051cf9f5dc366f31b5dcc4e2952c2b954767be8a
@ -192,4 +192,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 1df1bb3ed89ef4be6115286519e24a9fad12e640
COCOAPODS: 1.14.2
COCOAPODS: 1.15.2

View file

@ -157,7 +157,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View file

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:provider/provider.dart';
import '../globals.dart';
import '../services/auth_service.dart';
class LoginAwareCachedNetworkImage extends StatelessWidget {
@ -22,12 +23,12 @@ class LoginAwareCachedNetworkImage extends StatelessWidget {
Widget build(BuildContext context) {
final profile = context.watch<AccountsService>().currentProfile;
Map<String, String>? headers;
Map<String, String> headers = {'user-agent': userAgent};
try {
final imageServer = Uri.parse(imageUrl).host;
if (imageServer == profile.serverName) {
headers = {'Authorization': profile.credentials.authHeaderValue};
headers['Authorization'] = profile.credentials.authHeaderValue;
}
} catch (e) {
_logger.severe('Error Parsing ImageURL: $e');

View file

@ -142,12 +142,14 @@ class NotificationControl extends StatelessWidget {
onTapUrl: (_) async => onTap!(),
),
),
subtitle: GestureDetector(
onTap: onTap,
child: Text(
ElapsedDateUtils.epochSecondsToString(notification.timestamp),
),
),
subtitle: notification.type == NotificationType.follow_request
? null
: GestureDetector(
onTap: onTap,
child: Text(
ElapsedDateUtils.epochSecondsToString(notification.timestamp),
),
),
trailing: notification.dismissed ||
notification.type == NotificationType.direct_message
? null

View file

@ -717,6 +717,7 @@ class RemoteFileClient extends FriendicaClient {
url,
headers: {
'Authorization': _profile.credentials.authHeaderValue,
'user-agent': userAgent,
},
);
@ -742,6 +743,7 @@ class RemoteFileClient extends FriendicaClient {
final postUri = Uri.parse('https://$serverName/api/friendica/photo/create');
final request = http.MultipartRequest('POST', postUri);
request.headers['Authorization'] = _profile.credentials.authHeaderValue;
request.headers['user-agent'] = userAgent;
if (usePhpDebugging) {
request.headers['Cookie'] = 'XDEBUG_SESSION=PHPSTORM;path=/';
}

View file

@ -19,6 +19,9 @@ final platformIsDesktop = !platformIsMobile;
final useImagePicker = kIsWeb || platformIsMobile;
String appVersion = '';
String userAgent = '';
const usePhpDebugging = false;
const maxViewPortalHeight = 750.0;

View file

@ -4,6 +4,7 @@ import 'package:flutter/material.dart';
import 'package:logging/logging.dart';
import 'package:media_kit/media_kit.dart';
import 'package:multi_trigger_autocomplete/multi_trigger_autocomplete.dart';
import 'package:package_info_plus/package_info_plus.dart';
import 'package:provider/provider.dart';
import 'app_theme.dart';
@ -45,6 +46,7 @@ void main() async {
await fixLetsEncryptCertOnOldAndroid();
await dependencyInjectionInitialization();
await setupPackageInfoAndUserAgent();
runApp(DevicePreview(
enabled: !kReleaseMode && enablePreview,
@ -52,6 +54,12 @@ void main() async {
));
}
Future<void> setupPackageInfoAndUserAgent() async {
PackageInfo packageInfo = await PackageInfo.fromPlatform();
appVersion = packageInfo.version;
userAgent = 'Relatica/$appVersion';
}
class App extends StatelessWidget {
const App({super.key});

View file

@ -191,7 +191,7 @@ class _CircleEditorScreenState extends State<CircleEditorScreen> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text('Circle Members:',
Text('Circle Members (${members.length}):',
style: Theme.of(context).textTheme.headlineSmall),
IconButton(
onPressed: () {

View file

@ -28,6 +28,7 @@ class SettingsScreen extends StatelessWidget {
child: ResponsiveMaxWidth(
child: ListView(
children: [
buildVersionString(),
buildLowBandwidthWidget(settings),
buildThemeWidget(settings),
if (!kReleaseMode) buildColorBlindnessTestSettings(settings),
@ -40,6 +41,18 @@ class SettingsScreen extends StatelessWidget {
));
}
Widget buildVersionString() {
return Center(
child: Text(
'Relatica $appVersion',
style: const TextStyle(
decoration: TextDecoration.underline,
fontWeight: FontWeight.bold,
),
),
);
}
Widget buildLowBandwidthWidget(SettingsService settings) {
return ListTile(
title: const Text('Low bandwidth mode'),

View file

@ -29,7 +29,7 @@ class SplashScreen extends StatelessWidget {
SvgPicture.asset('icon/relatica_logo.svg', width: 128),
const VerticalPadding(),
Text(
'Relatica',
'Relatica $appVersion',
style: Theme.of(context).textTheme.headlineLarge,
),
const VerticalPadding(),

View file

@ -19,6 +19,18 @@ enum _RequestType {
const _expireDuration = Duration(seconds: 2);
class RelaticaUserAgentHttpClient extends http.BaseClient {
final http.Client _inner;
RelaticaUserAgentHttpClient() : _inner = http.Client();
@override
Future<http.StreamedResponse> send(http.BaseRequest request) {
request.headers['user-agent'] = userAgent;
return _inner.send(request);
}
}
class _CachedResponse {
final _RequestType requestType;
final Uri requestUri;
@ -112,7 +124,7 @@ class _ExpiringRequestCache {
print('Returning cached response for $type => $url');
response = _responses[requestStub]?.response ?? http.Response('', 555);
} else {
final request = http.get(
final request = RelaticaUserAgentHttpClient().get(
url,
headers: headers,
);
@ -184,7 +196,7 @@ FutureResult<String, ExecError> postUrl(
requestHeaders['Cookie'] = 'XDEBUG_SESSION=PHPSTORM;path=/';
}
try {
final request = http.post(
final request = RelaticaUserAgentHttpClient().post(
url,
headers: requestHeaders,
body: jsonEncode(body),
@ -215,7 +227,7 @@ FutureResult<String, ExecError> putUrl(
}) async {
_logger.fine('PUT: $url \n Body: $body');
try {
final request = http.put(
final request = RelaticaUserAgentHttpClient().put(
url,
headers: headers,
body: jsonEncode(body),
@ -246,7 +258,7 @@ FutureResult<String, ExecError> deleteUrl(
}) async {
_logger.fine('DELETE: $url');
try {
final request = http.delete(
final request = RelaticaUserAgentHttpClient().delete(
url,
headers: headers,
body: jsonEncode(body),

View file

@ -1,11 +1,11 @@
import 'dart:convert';
import 'package:html/parser.dart';
import 'package:http/http.dart' as http;
import 'package:result_monad/result_monad.dart';
import '../models/exec_error.dart';
import '../models/link_preview_data.dart';
import 'network_utils.dart';
const ogTitleKey = 'og:title';
const ogDescriptionKey = 'og:description';
@ -35,7 +35,7 @@ FutureResult<LinkPreviewData, ExecError> getLinkPreview(String url) async {
FutureResult<List<MapEntry<String, String>>, dynamic> _getOpenGraphData(
String url) async {
return runCatchingAsync<List<MapEntry<String, String>>>(() async {
final response = await http.get(Uri.parse(url));
final response = await RelaticaUserAgentHttpClient().get(Uri.parse(url));
if (response.statusCode != 200) {
return buildErrorResult(
type: ErrorType.serverError,

View file

@ -130,4 +130,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 137ddf7b4dbe5a83427ebf04ae8dea674cfd87fa
COCOAPODS: 1.14.2
COCOAPODS: 1.15.2

View file

@ -204,7 +204,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View file

@ -253,10 +253,10 @@ packages:
dependency: transitive
description:
name: dbus
sha256: "6f07cba3f7b3448d42d015bfd3d53fe12e5b36da2423f23838efc1d5fb31a263"
sha256: "365c771ac3b0e58845f39ec6deebc76e3276aa9922b0cc60840712094d9047ac"
url: "https://pub.dev"
source: hosted
version: "0.7.8"
version: "0.7.10"
desktop_window:
dependency: "direct main"
description:
@ -733,6 +733,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.8.1"
leak_tracker:
dependency: transitive
description:
name: leak_tracker
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
url: "https://pub.dev"
source: hosted
version: "10.0.0"
leak_tracker_flutter_testing:
dependency: transitive
description:
name: leak_tracker_flutter_testing
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
url: "https://pub.dev"
source: hosted
version: "2.0.1"
leak_tracker_testing:
dependency: transitive
description:
name: leak_tracker_testing
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
url: "https://pub.dev"
source: hosted
version: "2.0.1"
lints:
dependency: transitive
description:
@ -761,18 +785,18 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev"
source: hosted
version: "0.12.16"
version: "0.12.16+1"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
version: "0.5.0"
version: "0.8.0"
media_kit:
dependency: "direct main"
description:
@ -849,10 +873,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
url: "https://pub.dev"
source: hosted
version: "1.10.0"
version: "1.11.0"
mime:
dependency: transitive
description:
@ -926,7 +950,7 @@ packages:
source: hosted
version: "2.1.0"
package_info_plus:
dependency: transitive
dependency: "direct main"
description:
name: package_info_plus
sha256: "7e76fad405b3e4016cd39d08f455a4eb5199723cf594cd1b8916d47140d93017"
@ -945,10 +969,10 @@ packages:
dependency: "direct main"
description:
name: path
sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev"
source: hosted
version: "1.8.3"
version: "1.9.0"
path_parsing:
dependency: transitive
description:
@ -1025,10 +1049,10 @@ packages:
dependency: transitive
description:
name: plugin_platform_interface
sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
version: "2.1.6"
version: "2.1.8"
pointycastle:
dependency: transitive
description:
@ -1523,6 +1547,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.17"
vm_service:
dependency: transitive
description:
name: vm_service
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
url: "https://pub.dev"
source: hosted
version: "13.0.0"
volume_controller:
dependency: transitive
description:
@ -1535,10 +1567,10 @@ packages:
dependency: transitive
description:
name: wakelock_plus
sha256: f45a6c03aa3f8322e0a9d7f4a0482721c8789cb41d555407367650b8f9c26018
sha256: f268ca2116db22e57577fb99d52515a24bdc1d570f12ac18bb762361d43b043d
url: "https://pub.dev"
source: hosted
version: "1.1.3"
version: "1.1.4"
wakelock_plus_platform_interface:
dependency: transitive
description:
@ -1555,14 +1587,6 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
web:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.3.0"
web_socket_channel:
dependency: transitive
description:
@ -1575,10 +1599,10 @@ packages:
dependency: transitive
description:
name: win32
sha256: "350a11abd2d1d97e0cc7a28a81b781c08002aa2864d9e3f192ca0ffa18b06ed3"
sha256: b0f37db61ba2f2e9b7a78a1caece0052564d1bc70668156cf3a29d676fe4e574
url: "https://pub.dev"
source: hosted
version: "5.0.9"
version: "5.1.1"
win32_registry:
dependency: transitive
description:
@ -1620,5 +1644,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.2.0-194.0.dev <4.0.0"
dart: ">=3.2.0-0 <4.0.0"
flutter: ">=3.10.0"

View file

@ -2,7 +2,7 @@ name: relatica
description: A mobile and desktop client for interacting with the Friendica social network
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 0.9.0
version: 0.10.1
environment:
sdk: '>=3.0.0 <4.0.0'
@ -38,6 +38,7 @@ dependencies:
network_to_file_image: ^4.0.1
objectbox: ^2.3.1
objectbox_flutter_libs: ^2.3.1
package_info_plus: ^4.2.0
path: ^1.8.2
path_provider: ^2.0.11
provider: ^6.0.4