added option to reply on long press (and better possibilities to play with chat bubble drag)
This commit is contained in:
		@@ -182,6 +182,17 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
 | 
				
			|||||||
              ],
 | 
					              ],
 | 
				
			||||||
            ),
 | 
					            ),
 | 
				
			||||||
          ),
 | 
					          ),
 | 
				
			||||||
 | 
					          Visibility(
 | 
				
			||||||
 | 
					            visible: widget.bubbleData.isReplyable,
 | 
				
			||||||
 | 
					            child: ListTile(
 | 
				
			||||||
 | 
					              leading: const Icon(Icons.reply_outlined),
 | 
				
			||||||
 | 
					              title: const Text('Antworten'),
 | 
				
			||||||
 | 
					              onTap: () => {
 | 
				
			||||||
 | 
					                Provider.of<ChatProps>(context, listen: false).setReferenceMessageId(widget.bubbleData.id, context, widget.chatData.token),
 | 
				
			||||||
 | 
					                Navigator.of(context).pop(),
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            ),
 | 
				
			||||||
 | 
					          ),
 | 
				
			||||||
          Visibility(
 | 
					          Visibility(
 | 
				
			||||||
            visible: canReact,
 | 
					            visible: canReact,
 | 
				
			||||||
            child: ListTile(
 | 
					            child: ListTile(
 | 
				
			||||||
@@ -272,7 +283,7 @@ class _ChatBubbleState extends State<ChatBubble> with SingleTickerProviderStateM
 | 
				
			|||||||
            if(!widget.bubbleData.isReplyable) return;
 | 
					            if(!widget.bubbleData.isReplyable) return;
 | 
				
			||||||
            var dx = details.delta.dx - _dragStartPosition.dx;
 | 
					            var dx = details.delta.dx - _dragStartPosition.dx;
 | 
				
			||||||
            setState(() {
 | 
					            setState(() {
 | 
				
			||||||
              _position = _position.dx.abs() > 30 ? Offset(_position.dx, 0) : Offset(_position.dx + dx, 0);
 | 
					              _position = (_position.dx + dx).abs() > 30 ? Offset(_position.dx, 0) : Offset(_position.dx + dx, 0);
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          onHorizontalDragEnd: (DragEndDetails details) {
 | 
					          onHorizontalDragEnd: (DragEndDetails details) {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user