kopia lustrzana https://gitlab.com/mysocialportal/relatica
				
				
				
			Add top level gesture detector to post card to make easy opening
							rodzic
							
								
									f2b532e72f
								
							
						
					
					
						commit
						304551af57
					
				|  | @ -122,7 +122,13 @@ class _StatusControlState extends State<FlattenedTreeEntryControl> { | ||||||
|         top: otherPadding, |         top: otherPadding, | ||||||
|         bottom: otherPadding, |         bottom: otherPadding, | ||||||
|       ), |       ), | ||||||
|       child: bodyCard, |       child: GestureDetector( | ||||||
|  |           onTap: () { | ||||||
|  |             if (widget.showStatusOpenButton) { | ||||||
|  |               _goToPostView(); | ||||||
|  |             } | ||||||
|  |           }, | ||||||
|  |           child: bodyCard), | ||||||
|     ); |     ); | ||||||
|   } |   } | ||||||
| 
 | 
 | ||||||
|  | @ -265,6 +271,10 @@ class _StatusControlState extends State<FlattenedTreeEntryControl> { | ||||||
|       copyText, |       copyText, | ||||||
|     ]; |     ]; | ||||||
| 
 | 
 | ||||||
|  |     if (options.first == divider) { | ||||||
|  |       options.removeAt(0); | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     final entry = widget.originalItem.timelineEntry; |     final entry = widget.originalItem.timelineEntry; | ||||||
| 
 | 
 | ||||||
|     return PopupMenuButton<String>(onSelected: (menuOption) async { |     return PopupMenuButton<String>(onSelected: (menuOption) async { | ||||||
|  | @ -274,8 +284,7 @@ class _StatusControlState extends State<FlattenedTreeEntryControl> { | ||||||
| 
 | 
 | ||||||
|       switch (menuOption) { |       switch (menuOption) { | ||||||
|         case goToPost: |         case goToPost: | ||||||
|           context.push( |           _goToPostView(); | ||||||
|               '/post/view/${item.timelineEntry.id}/${item.timelineEntry.id}'); |  | ||||||
|           break; |           break; | ||||||
|         case editStatus: |         case editStatus: | ||||||
|           if (item.timelineEntry.parentId.isEmpty) { |           if (item.timelineEntry.parentId.isEmpty) { | ||||||
|  | @ -361,4 +370,9 @@ class _StatusControlState extends State<FlattenedTreeEntryControl> { | ||||||
|     } |     } | ||||||
|     setState(() {}); |     setState(() {}); | ||||||
|   } |   } | ||||||
|  | 
 | ||||||
|  |   void _goToPostView() { | ||||||
|  |     context | ||||||
|  |         .push('/post/view/${item.timelineEntry.id}/${item.timelineEntry.id}'); | ||||||
|  |   } | ||||||
| } | } | ||||||
|  |  | ||||||
		Ładowanie…
	
		Reference in New Issue
	
	 Hank Grabowski
						Hank Grabowski