Skip to content

Commit

Permalink
fix: @が一つの場合にはURLのホストを含めるように(#582)
Browse files Browse the repository at this point in the history
  • Loading branch information
4ster1sk committed Nov 22, 2024
1 parent 81d4f15 commit b806f0e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/view/common/misskey_notes/link_navigator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ class LinkNavigator {
);
} else if (uri.pathSegments.length == 1 &&
uri.pathSegments.first.startsWith("@")) {
await onMentionTap(context, ref, uri.pathSegments.first, host);
final userName = ("@".allMatches(uri.pathSegments.first).length == 1)
? "${uri.pathSegments.first}@${uri.host}"
: uri.pathSegments.first;

await onMentionTap(context, ref, userName, host);
} else {
if (await canLaunchUrl(uri)) {
await launchUrl(uri, mode: LaunchMode.externalApplication);
Expand Down

0 comments on commit b806f0e

Please sign in to comment.