mirror of
				https://gitlab.com/famedly/fluffychat.git
				synced 2025-10-31 03:57:27 +01:00 
			
		
		
		
	fix: UserBottomSheet
This commit is contained in:
		
							parent
							
								
									642db67709
								
							
						
					
					
						commit
						dbb0464a2a
					
				| @ -81,6 +81,7 @@ class ChatUI extends StatelessWidget { | ||||
|                                 builder: (c) => UserBottomSheet( | ||||
|                                   user: controller.room.getUserByMXIDSync( | ||||
|                                       controller.room.directChatMatrixID), | ||||
|                                   outerContext: context, | ||||
|                                   onMention: () => controller | ||||
|                                           .sendController.text += | ||||
|                                       '${controller.room.directChatMatrixID} ', | ||||
| @ -379,6 +380,7 @@ class ChatUI extends StatelessWidget { | ||||
|                                                     builder: (c) => | ||||
|                                                         UserBottomSheet( | ||||
|                                                       user: event.sender, | ||||
|           outerContext: context, | ||||
|                                                       onMention: () => controller | ||||
|                                                               .sendController | ||||
|                                                               .text += | ||||
|  | ||||
| @ -110,7 +110,8 @@ class UserBottomSheetUI extends StatelessWidget { | ||||
|                     title: Text(L10n.of(context).username), | ||||
|                     subtitle: Text(user.id), | ||||
|                     trailing: Icon(Icons.share_outlined), | ||||
|                     onTap: () => FluffyShare.share(user.id, context), | ||||
|                     onTap: () => FluffyShare.share( | ||||
|                         user.id, controller.widget.outerContext), | ||||
|                   ), | ||||
|                   if (presence != null) | ||||
|                     ListTile( | ||||
|  | ||||
| @ -12,10 +12,12 @@ import 'ui/user_bottom_sheet_ui.dart'; | ||||
| class UserBottomSheet extends StatefulWidget { | ||||
|   final User user; | ||||
|   final Function onMention; | ||||
|   final BuildContext outerContext; | ||||
| 
 | ||||
|   const UserBottomSheet({ | ||||
|     Key key, | ||||
|     @required this.user, | ||||
|     @required this.outerContext, | ||||
|     this.onMention, | ||||
|   }) : super(key: key); | ||||
| 
 | ||||
| @ -81,8 +83,9 @@ class UserBottomSheetController extends State<UserBottomSheet> { | ||||
|         break; | ||||
|       case 'message': | ||||
|         final roomId = await widget.user.startDirectChat(); | ||||
|         await AdaptivePageLayout.of(context) | ||||
|         await AdaptivePageLayout.of(widget.outerContext) | ||||
|             .pushNamedAndRemoveUntilIsFirst('/rooms/$roomId'); | ||||
|         Navigator.of(context, rootNavigator: false).pop(); | ||||
|         break; | ||||
|     } | ||||
|   } | ||||
|  | ||||
| @ -29,6 +29,7 @@ class ParticipantListItem extends StatelessWidget { | ||||
|         context: context, | ||||
|         builder: (c) => UserBottomSheet( | ||||
|           user: user, | ||||
|           outerContext: context, | ||||
|         ), | ||||
|       ), | ||||
|       title: Row( | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Christian Pauly
						Christian Pauly