diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f64d9fe..2d3c456 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -11,11 +11,11 @@ code_analyze: script: - flutter analyze -#test: -# stage: coverage -# dependencies: [] -# script: -# - flutter test +test: + stage: coverage + dependencies: [] + script: + - flutter test build_web: stage: coverage @@ -45,17 +45,6 @@ build_android_fdroid: only: - master -build_android_debug: - stage: coverage - script: - - flutter build apk --debug - artifacts: - when: on_success - paths: - - build/app/outputs/apk/release/app-debug.apk - except: - - master - pages: stage: publish image: ruby:2.3 diff --git a/lib/components/message_content.dart b/lib/components/message_content.dart index 76ded59..7781e37 100644 --- a/lib/components/message_content.dart +++ b/lib/components/message_content.dart @@ -3,6 +3,7 @@ import 'package:cached_network_image/cached_network_image.dart'; import 'package:famedlysdk/famedlysdk.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; +import 'package:link_text/link_text.dart'; import 'package:url_launcher/url_launcher.dart'; import 'matrix.dart'; @@ -85,11 +86,20 @@ class MessageContent extends StatelessWidget { ? "You: " : "${event.sender.calcDisplayname()}: " : ""; - return Text( - senderPrefix + event.getBody(), - maxLines: maxLines, - overflow: textOnly ? TextOverflow.ellipsis : null, - style: TextStyle( + if (textOnly) { + return Text( + senderPrefix + event.getBody(), + maxLines: maxLines, + overflow: TextOverflow.ellipsis, + style: TextStyle( + color: textColor, + decoration: event.redacted ? TextDecoration.lineThrough : null, + ), + ); + } + return LinkText( + text: senderPrefix + event.getBody(), + textStyle: TextStyle( color: textColor, decoration: event.redacted ? TextDecoration.lineThrough : null, ), diff --git a/pubspec.lock b/pubspec.lock index a22b3db..e19a503 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -172,6 +172,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.4.0" + link_text: + dependency: "direct main" + description: + name: link_text + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.1" localstorage: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 5345b90..eabfeb7 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -39,6 +39,7 @@ dependencies: sqflite: ^1.2.0 cached_network_image: ^2.0.0 firebase_messaging: ^6.0.9 + link_text: ^0.1.1 dev_dependencies: flutter_test: