mirror of
				https://gitlab.com/famedly/fluffychat.git
				synced 2025-11-04 06:17:26 +01:00 
			
		
		
		
	fix: Behaviour of homeserver textfield
This commit is contained in:
		
							parent
							
								
									6728993c50
								
							
						
					
					
						commit
						2c8a8a4313
					
				@ -29,7 +29,8 @@ class HomeserverPickerUI extends StatelessWidget {
 | 
			
		||||
            padding: EdgeInsets.zero,
 | 
			
		||||
            onChanged: (s) => controller.domain = s,
 | 
			
		||||
            readOnly: !AppConfig.allowOtherHomeservers,
 | 
			
		||||
            onSubmit: (_) => controller.checkHomeserverAction,
 | 
			
		||||
            onSubmit: (_) => controller.checkHomeserverAction(),
 | 
			
		||||
            unfocusOnClear: false,
 | 
			
		||||
          ),
 | 
			
		||||
          elevation: 0,
 | 
			
		||||
        ),
 | 
			
		||||
 | 
			
		||||
@ -14,6 +14,7 @@ class DefaultAppBarSearchField extends StatefulWidget {
 | 
			
		||||
  final EdgeInsets padding;
 | 
			
		||||
  final bool readOnly;
 | 
			
		||||
  final Widget prefixIcon;
 | 
			
		||||
  final bool unfocusOnClear;
 | 
			
		||||
 | 
			
		||||
  DefaultAppBarSearchField({
 | 
			
		||||
    Key key,
 | 
			
		||||
@ -27,6 +28,7 @@ class DefaultAppBarSearchField extends StatefulWidget {
 | 
			
		||||
    this.padding,
 | 
			
		||||
    this.readOnly = false,
 | 
			
		||||
    this.prefixIcon,
 | 
			
		||||
    this.unfocusOnClear = true,
 | 
			
		||||
  }) : super(key: key);
 | 
			
		||||
 | 
			
		||||
  @override
 | 
			
		||||
@ -105,7 +107,7 @@ class DefaultAppBarSearchFieldState extends State<DefaultAppBarSearchField> {
 | 
			
		||||
                  onPressed: () {
 | 
			
		||||
                    _searchController.clear();
 | 
			
		||||
                    widget.onChanged?.call('');
 | 
			
		||||
                    _focusNode.unfocus();
 | 
			
		||||
                    if (widget.unfocusOnClear) _focusNode.unfocus();
 | 
			
		||||
                  },
 | 
			
		||||
                )
 | 
			
		||||
              : widget.suffix,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user