mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2025-02-19 23:50:41 +01:00
chore: Follow up fix html messages
This commit is contained in:
parent
7da6b32975
commit
ac9dbbb41f
@ -95,7 +95,7 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
final identityParts = url.parseIdentifierIntoParts();
|
final identityParts = url.parseIdentifierIntoParts();
|
||||||
final identifier = identityParts?.primaryIdentifier;
|
final identifier = identityParts?.primaryIdentifier;
|
||||||
if (identifier == null) {
|
if (identifier == null) {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
if (identifier.sigil == '@') {
|
if (identifier.sigil == '@') {
|
||||||
// we have a user pill
|
// we have a user pill
|
||||||
@ -127,13 +127,13 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
if (identifier.sigil == '!') {
|
if (identifier.sigil == '!') {
|
||||||
// we have a room ID pill
|
// we have a room ID pill
|
||||||
final r = room.client.getRoomById(identifier);
|
final r = room.client.getRoomById(identifier);
|
||||||
if (r == null) {
|
if (r == null) {
|
||||||
return null;
|
return {};
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
'displayname':
|
'displayname':
|
||||||
@ -141,8 +141,8 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
return null;
|
return {};
|
||||||
} as Future<Map<String, dynamic>> Function(String)?,
|
},
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,7 @@ class _StoryButton extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 8),
|
const Spacer(),
|
||||||
Text(
|
Text(
|
||||||
label,
|
label,
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user