mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-25 06:52:35 +01:00
fix: Start chat
This commit is contained in:
parent
17a3311a90
commit
92ff960951
@ -357,11 +357,17 @@ class _SearchViewState extends State<SearchView> {
|
|||||||
itemBuilder: (BuildContext context, int i) {
|
itemBuilder: (BuildContext context, int i) {
|
||||||
var foundProfile = foundProfiles[i];
|
var foundProfile = foundProfiles[i];
|
||||||
return ListTile(
|
return ListTile(
|
||||||
onTap: () {
|
onTap: () async {
|
||||||
setState(() {
|
final roomID = await showFutureLoadingDialog(
|
||||||
_controller.text = currentSearchTerm =
|
context: context,
|
||||||
foundProfile.userId.substring(1);
|
future: () => Matrix.of(context)
|
||||||
});
|
.client
|
||||||
|
.startDirectChat(foundProfile.userId),
|
||||||
|
);
|
||||||
|
if (roomID.error == null) {
|
||||||
|
await AdaptivePageLayout.of(context)
|
||||||
|
.popAndPushNamed('/rooms/${roomID.result}');
|
||||||
|
}
|
||||||
},
|
},
|
||||||
leading: Avatar(
|
leading: Avatar(
|
||||||
foundProfile.avatarUrl,
|
foundProfile.avatarUrl,
|
||||||
|
Loading…
Reference in New Issue
Block a user