mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-18 10:52:34 +01:00
feat: Display the room name in room pills
This commit is contained in:
parent
ab90755fdc
commit
a33a20af4c
@ -1,8 +1,10 @@
|
|||||||
import 'package:matrix/matrix.dart';
|
import 'package:matrix/matrix.dart';
|
||||||
import 'package:flutter_matrix_html/flutter_html.dart';
|
import 'package:flutter_matrix_html/flutter_html.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||||
import '../../utils/url_launcher.dart';
|
import '../../utils/url_launcher.dart';
|
||||||
import '../../config/setting_keys.dart';
|
import '../../config/setting_keys.dart';
|
||||||
|
import '../../utils/matrix_sdk_extensions.dart/matrix_locals.dart';
|
||||||
|
|
||||||
import '../matrix.dart';
|
import '../matrix.dart';
|
||||||
|
|
||||||
@ -108,7 +110,8 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
state.content['alt_aliases'].contains(identifier)))) {
|
state.content['alt_aliases'].contains(identifier)))) {
|
||||||
// we have a room!
|
// we have a room!
|
||||||
return {
|
return {
|
||||||
'displayname': identifier,
|
'displayname':
|
||||||
|
r.getLocalizedDisplayname(MatrixLocals(L10n.of(context))),
|
||||||
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -122,7 +125,8 @@ class HtmlMessage extends StatelessWidget {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
'displayname': r.canonicalAlias,
|
'displayname':
|
||||||
|
r.getLocalizedDisplayname(MatrixLocals(L10n.of(context))),
|
||||||
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
'avatar_url': r.getState('m.room.avatar')?.content['url'],
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user