You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pwa_share_image.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,8 @@ The `/share` handler in `src/serviceworker.js` processes incoming share requests
34
34
* A unique ID is generated via `generateUniqueId('img')`.
35
35
* The file blob is stored in the `IMAGE_STORE` IndexedDB using `addImageDB`.
36
36
* A markdown image reference `` is created.
37
-
4.**Note Integration**:
38
-
* The image reference and existing text/link content are combined into a final string using `filter(Boolean).join('\n\n')`.
39
-
* This content is prepended to the existing 'Shared Inbox' note or used to create a new one if it doesn't exist.
37
+
## Note Integration
38
+
***Images**: If a file is shared, it is stored in the 'Shared Images' note (or created if it doesn't exist). Any text/link content associated with the share is appended after the image markdown.
39
+
***Text/Links**: If only text or a URL is shared, it is stored in the 'Shared Inbox' note as before.
40
+
***Unique Destinations**: The app uses `shared_images_id` and `shared_inbox_id` meta keys to keep these destinations separate.
40
41
5.**Backward Compatibility**: The code checks `imageFile instanceof File`. If no image is shared, the reference remains empty and the text/link sharing logic proceeds as it did previously.
0 commit comments