Skip to content

Commit

Permalink
Merge tag 'v0.9.4' into develop
Browse files Browse the repository at this point in the history
# Conflicts:
#	pubspec.yaml
  • Loading branch information
lucien144 committed Mar 2, 2024
2 parents 87ef464 + 9b21c57 commit ca2bccd
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ android {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId 'net.lucien144.fyx'
minSdkVersion 21
targetSdkVersion 31
targetSdkVersion 33
//multiDexEnabled true // Uncomment for dev
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
Expand Down
2 changes: 1 addition & 1 deletion lib/components/mail_list_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class _MailListItemState extends State<MailListItem> {
content: widget.mail.content,
topLeftWidget: PostAvatar(widget.mail.direction == MailDirection.from ? widget.mail.participant : MainRepository().credentials!.nickname,
description:
'→ ${widget.mail.direction == MailDirection.to ? widget.mail.participant : MainRepository().credentials!.nickname}, ~${Helpers.relativeTime(widget.mail.time)}'),
'→ ${widget.mail.direction == MailDirection.to ? widget.mail.participant : MainRepository().credentials!.nickname}, ${Helpers.absoluteTime(widget.mail.time)} ~${Helpers.relativeTime(widget.mail.time)}'),
topRightWidget: Row(
children: <Widget>[
Visibility(
Expand Down
4 changes: 2 additions & 2 deletions lib/model/post/content/Regular.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ class ContentRegular extends Content {
}

void parseEmailAddresses() {
final r = RegExp(r"([a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+)");
final r = RegExp(r"(?<!<[^>]*)([a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+)");
final replace = (match) => '<a href="mailto:${match[1]}">${match[1]}</a>';
_body = _body.replaceAllMapped(r, replace);
_rawBody = _rawBody.replaceAllMapped(r, replace);
}

void parsePhoneNumbers() {
final r = RegExp(r"((\+420\s?)?[1-9][0-9]{2}\s?[0-9]{3}\s?[0-9]{3})");
final r = RegExp(r"(?<!<[^>]*)((\+420\s?)?[1-9][0-9]{2}\s?[0-9]{3}\s?[0-9]{3})");
final replace = (match) => '<a href="tel:${match[1]}">${match[1]}</a>';
_body = _body.replaceAllMapped(r, replace);
_rawBody = _rawBody.replaceAllMapped(r, replace);
Expand Down
1 change: 0 additions & 1 deletion lib/theme/Helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ class Helpers {

if (test.hasMatch(uri)) {
final mailId = int.parse(test.firstMatch(uri)?.group(1) ?? '0');
print(uri);
return {INTERNAL_URI_PARSER.mailId: mailId > 0 ? mailId : null};
}
return {};
Expand Down
2 changes: 1 addition & 1 deletion test/model/post_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ void main() {
expect(post.id, 43695891);
expect(post.nick, 'HYPNOGEN');
expect(post.avatar, 'https://nyx.cz/H/HYPNOGEN.gif');
expect(post.time, 1425854167000);
expect(post.time, 1425850567000);
expect(post.rating, 7);
expect(post.content.rawBody, rawContent.trim());
expect(parse(post.content.body).querySelectorAll('img').length, 1, reason: 'No consecutive image, therefore image not removed.');
Expand Down

0 comments on commit ca2bccd

Please sign in to comment.