forked from Henry-Hiles/nexus
Add mentions, kind of
This commit is contained in:
parent
dc95024b2c
commit
1cd3dad8ab
2 changed files with 23 additions and 4 deletions
|
|
@ -60,11 +60,11 @@ A simple and user-friendly Matrix client made with Flutter and the Matrix Dart S
|
||||||
- [ ] Downloading attachments
|
- [ ] Downloading attachments
|
||||||
- [ ] Opening attachments in their own view
|
- [ ] Opening attachments in their own view
|
||||||
- [ ] Mentions
|
- [ ] Mentions
|
||||||
- [ ] Users
|
- [x] Users
|
||||||
- [ ] Rooms
|
- [x] Rooms
|
||||||
- [ ] Plain text
|
- [ ] Plain text
|
||||||
- [ ] Matrix URIs
|
- [ ] Matrix URIs
|
||||||
- [ ] Matrix.to links
|
- [x] Matrix.to links
|
||||||
- [x] Custom emojis/stickers
|
- [x] Custom emojis/stickers
|
||||||
- [ ] Encrypted messages
|
- [ ] Encrypted messages
|
||||||
- [x] History loading
|
- [x] History loading
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,26 @@ class Html extends ConsumerWidget {
|
||||||
|
|
||||||
"blockquote" => Quoted(Html(element.innerHtml, client: client)),
|
"blockquote" => Quoted(Html(element.innerHtml, client: client)),
|
||||||
|
|
||||||
|
"a" =>
|
||||||
|
Uri.tryParse(element.attributes["href"] ?? "")?.host == "matrix.to"
|
||||||
|
? InlineCustomWidget(
|
||||||
|
child: ActionChip(
|
||||||
|
label: Text(
|
||||||
|
element.text,
|
||||||
|
style: TextStyle(
|
||||||
|
fontWeight: FontWeight.bold,
|
||||||
|
color: Theme.of(context).colorScheme.onPrimary,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
backgroundColor: Theme.of(context).colorScheme.primary,
|
||||||
|
onPressed: () {
|
||||||
|
// TODO: Open room or join room dialog, or user popover
|
||||||
|
showAboutDialog(context: context);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: null,
|
||||||
|
|
||||||
"img" =>
|
"img" =>
|
||||||
element.attributes["src"] == null
|
element.attributes["src"] == null
|
||||||
? null
|
? null
|
||||||
|
|
@ -90,7 +110,6 @@ class Html extends ConsumerWidget {
|
||||||
"h5" ||
|
"h5" ||
|
||||||
"h6" ||
|
"h6" ||
|
||||||
"p" ||
|
"p" ||
|
||||||
"a" ||
|
|
||||||
"ul" ||
|
"ul" ||
|
||||||
"ol" ||
|
"ol" ||
|
||||||
"sup" ||
|
"sup" ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue