mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-12 17:00:28 +00:00
feat: Enhance message handling for drawings
- Added properties to the Message model to track drawing status and associated drawing ID. - Updated AppProvider to mark messages as drawings and link them to their respective drawing IDs. - Enhanced DrawingProvider to manage received drawings and their visibility. - Implemented navigation to drawings in MapProvider, including dynamic zoom levels based on drawing size. - Updated MessagesProvider to parse drawing messages and manage linked drawings. - Enhanced MessagesTab to support drawing message interactions, including navigation and coordinate copying. - Created DrawingMinimapPreview widget for visual representation of drawings in message bubbles. - Improved DrawingToolbar to handle sharing of drawings, ensuring only unshared drawings are sent. - Added utility functions in DrawingMessageParser for extracting drawing metadata.
This commit is contained in:
@@ -150,10 +150,16 @@ class AppProvider with ChangeNotifier {
|
||||
debugPrint(' Drawing linked to message ID: ${message.id}');
|
||||
drawingProvider.addReceivedDrawing(drawing);
|
||||
|
||||
// Add the original drawing message to chat (not a modified info message)
|
||||
// Update message to mark as drawing and link to drawing ID
|
||||
final updatedMessage = message.copyWith(
|
||||
isDrawing: true,
|
||||
drawingId: drawing.id,
|
||||
);
|
||||
|
||||
// Add the drawing message to chat with drawing metadata
|
||||
// This allows users to click on the drawing message to navigate to it
|
||||
messagesProvider.addMessage(
|
||||
message,
|
||||
updatedMessage,
|
||||
contactLookup: (name) => '',
|
||||
);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user