Use identifiers from sdk
This commit is contained in:
parent
6b93b8d393
commit
1bf9dbecf6
4 changed files with 7 additions and 7 deletions
|
|
@ -47,7 +47,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|||
}
|
||||
|
||||
void setCanonicalAliasAction(context, s) async {
|
||||
final String domain = widget.room.client.userID.split(":")[1];
|
||||
final String domain = widget.room.client.userID.domain;
|
||||
final String canonicalAlias = "%23" + s + "%3A" + domain;
|
||||
final Event aliasEvent = widget.room.getState("m.room.aliases", domain);
|
||||
final List aliases =
|
||||
|
|
@ -282,7 +282,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
|||
?.replaceAll("#", "") ??
|
||||
I18n.of(context).alias,
|
||||
prefixText: "#",
|
||||
suffixText: widget.room.client.userID.split(":")[1],
|
||||
suffixText: widget.room.client.userID.domain,
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ class _NewPrivateChatState extends State<_NewPrivateChat> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final String defaultDomain = Matrix.of(context).client.userID.split(":")[1];
|
||||
final String defaultDomain = Matrix.of(context).client.userID.domain;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(I18n.of(context).newPrivateChat),
|
||||
|
|
@ -190,7 +190,7 @@ class _NewPrivateChatState extends State<_NewPrivateChat> {
|
|||
),
|
||||
title: Text(
|
||||
foundProfile["display_name"] ??
|
||||
foundProfile["user_id"].split(":").first.substring(1),
|
||||
foundProfile["user_id"].localpart,
|
||||
style: TextStyle(),
|
||||
maxLines: 1,
|
||||
),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue