Skip to content

Commit

Permalink
TW-1735: Can open chat when search exact Matrix ID (#1911)
Browse files Browse the repository at this point in the history
* TW-1735: Add function when tap external contact

* TW-1735: Add search items hover radius
  • Loading branch information
hieutbui authored Jul 8, 2024
1 parent 64dd70f commit a5e3019
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
24 changes: 20 additions & 4 deletions lib/pages/contacts_tab/contacts_tab_body_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,26 @@ class _SliverContactsList extends StatelessWidget {
}

if (success is PresentationExternalContactSuccess) {
final externalContact = success.contact;
return SliverToBoxAdapter(
child: ExpansionContactListTile(
contact: success.contact,
highlightKeyword: controller.textEditingController.text,
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: ContactsTabViewStyle.padding,
),
child: InkWell(
borderRadius: ContactsTabViewStyle.searchItemsHoverRadius,
onTap: () {
controller.onContactTap(
context: context,
path: 'rooms',
contact: externalContact,
);
},
child: ExpansionContactListTile(
contact: externalContact,
highlightKeyword: controller.textEditingController.text,
),
),
),
);
}
Expand Down Expand Up @@ -409,7 +425,7 @@ class _Contact extends StatelessWidget {
horizontal: ContactsTabViewStyle.padding,
),
child: InkWell(
borderRadius: BorderRadius.circular(12),
borderRadius: ContactsTabViewStyle.searchItemsHoverRadius,
onTap: () {
controller.onContactTap(
context: context,
Expand Down
2 changes: 2 additions & 0 deletions lib/pages/contacts_tab/contacts_tab_view_style.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ class ContactsTabViewStyle {
static const double padding = 8.0;
static const EdgeInsets loadingPadding = EdgeInsets.all(16);
static const double loadingSpacer = 16;

static const searchItemsHoverRadius = BorderRadius.all(Radius.circular(12));
}

0 comments on commit a5e3019

Please sign in to comment.