mirror of
				https://gitlab.com/famedly/fluffychat.git
				synced 2025-11-03 22:07:23 +01:00 
			
		
		
		
	feat: Also suggest username completions based on their slugs
This commit is contained in:
		
							parent
							
								
									f01c62c23d
								
							
						
					
					
						commit
						3d980df674
					
				@ -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…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user