mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-22 21:42:35 +01:00
fix: Click on room aliases
This commit is contained in:
parent
b0ccf845b8
commit
c5620c4f69
@ -131,11 +131,18 @@ class SearchController extends State<Search> {
|
|||||||
setState(() {});
|
setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool _init = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
alias = VRouter.of(context).queryParameters['query'];
|
if (!_init) {
|
||||||
if (alias != null) genericSearchTerm ??= alias;
|
_init = true;
|
||||||
|
controller.text = VRouter.of(context).queryParameters['query'] ?? '';
|
||||||
|
WidgetsBinding.instance
|
||||||
|
.addPostFrameCallback((_) => search(controller.text));
|
||||||
|
}
|
||||||
|
|
||||||
return SearchView(this);
|
return SearchView(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// #fluffychat:matrix.org
|
@ -62,7 +62,8 @@ class SearchView extends StatelessWidget {
|
|||||||
);
|
);
|
||||||
return DefaultTabController(
|
return DefaultTabController(
|
||||||
length: 3,
|
length: 3,
|
||||||
initialIndex: 1,
|
initialIndex:
|
||||||
|
controller.controller.text?.startsWith('#') ?? false ? 0 : 1,
|
||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
appBar: AppBar(
|
appBar: AppBar(
|
||||||
leading: BackButton(),
|
leading: BackButton(),
|
||||||
|
Loading…
Reference in New Issue
Block a user