mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 14:32:37 +01:00
Merge branch 'soru/slug-suggestions' into 'main'
feat: Also suggest username completions based on their slugs See merge request famedly/fluffychat!450
This commit is contained in:
commit
2943a6c8b1
@ -6,6 +6,7 @@ import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_typeahead/flutter_typeahead.dart';
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:slugify/slugify.dart';
|
||||
import 'avatar.dart';
|
||||
import 'matrix.dart';
|
||||
|
||||
@ -110,7 +111,9 @@ class InputBar extends StatelessWidget {
|
||||
final userSearch = userMatch[1].toLowerCase();
|
||||
for (final user in room.getParticipants()) {
|
||||
if ((user.displayName != null &&
|
||||
user.displayName.toLowerCase().contains(userSearch)) ||
|
||||
(user.displayName.toLowerCase().contains(userSearch) ||
|
||||
slugify(user.displayName.toLowerCase())
|
||||
.contains(userSearch))) ||
|
||||
user.id.split(':')[0].toLowerCase().contains(userSearch)) {
|
||||
ret.add({
|
||||
'type': 'user',
|
||||
|
@ -1111,7 +1111,7 @@ packages:
|
||||
source: sdk
|
||||
version: "0.0.99"
|
||||
slugify:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: slugify
|
||||
url: "https://pub.dartlang.org"
|
||||
|
@ -64,6 +64,7 @@ dependencies:
|
||||
scroll_to_index: ^2.0.0
|
||||
sentry: ^5.1.0
|
||||
share: ^2.0.4
|
||||
slugify: ^2.0.0
|
||||
swipe_to_action: ^0.2.0
|
||||
uni_links: ^0.5.1
|
||||
unifiedpush: ^1.0.6
|
||||
|
Loading…
Reference in New Issue
Block a user