Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
497b4d7
Add Comment and Reaction models with data provider
ashilkn Dec 5, 2025
8e5e843
Remove updateComment method
ashilkn Dec 5, 2025
49a901d
Debug print user id
ashilkn Dec 8, 2025
0b01e3a
Formating changes
ashilkn Dec 8, 2025
f018600
Create db for storing social states + show like button and comment ic…
ashilkn Dec 8, 2025
0b760cc
Add social debug screen with seed and delete comments options
ashilkn Dec 8, 2025
5a2477c
Formatting changes
ashilkn Dec 8, 2025
ac70823
Add comments screen (dummy UI) with pagination
ashilkn Dec 8, 2025
61c2f72
Fix reply state bug in comments section
ashilkn Dec 9, 2025
95e7b7e
Make the comments screen UI more similar to figma
ashilkn Dec 9, 2025
b3313d2
Show avatars in comments screen
ashilkn Dec 9, 2025
a23be8b
Add option to delete all reactions from local db
ashilkn Dec 9, 2025
1abbb0d
Make comments screen more similar to figma design
ashilkn Dec 9, 2025
d086eb0
Make comments screen more similar to figma design + refactor to use w…
ashilkn Dec 9, 2025
1800625
Resolve merge conflicts and merge main
ashilkn Dec 12, 2025
8ae9a2a
Make comments screen more similar to figma design
ashilkn Dec 12, 2025
22e0713
Make comments screen more similar to figma design
ashilkn Dec 12, 2025
03448e3
Make comments screen more similar to figma design
ashilkn Dec 16, 2025
082b5e5
Show 'You' when replying to own comment
ashilkn Dec 16, 2025
b3cca0c
Make comments screen ore similar to figma design
ashilkn Dec 16, 2025
4e3812b
Add long-press highlight overlay for comments
ashilkn Dec 16, 2025
2a55fe0
Refactor comment overlay and fix tap dismissal
ashilkn Dec 16, 2025
b0673a1
Fix tap not getting registered on the parts of the capsule widgt wher…
ashilkn Dec 18, 2025
5e29088
Fix highlighted own comment's horizontal alignment
ashilkn Dec 18, 2025
327b795
Hide header in highlighted comment overlay
ashilkn Dec 18, 2025
1de2a32
Make the animation on the comment bubble delightful on selecting (lon…
ashilkn Dec 18, 2025
11f4783
Make UI of CommentActionsPopup similar to figma
ashilkn Dec 19, 2025
f9e40a2
Apply scale animation to both bubble and actions popup
ashilkn Dec 20, 2025
e90ce7a
Fade out capsule when comment is highlighted
ashilkn Dec 20, 2025
658b62d
Add delayed fade-in animation for capsule after unhighlight
ashilkn Dec 20, 2025
d78a307
Update padding
ashilkn Dec 20, 2025
96f6a8f
Add delete comment functionality with confirmation dialog
ashilkn Dec 20, 2025
6c9ca0a
Update UI state immediately after comment deletion
ashilkn Dec 20, 2025
cf18930
Refresh reply parent when original comment is deleted
ashilkn Dec 20, 2025
e22e159
Add close button to reply preview widget
ashilkn Dec 20, 2025
c26434c
Add animated dismiss for reply preview
ashilkn Dec 20, 2025
a914011
Simplify capsule animation in comment bubble widget
ashilkn Dec 20, 2025
677fa5d
Extract overlay dismissed check to getter
ashilkn Dec 20, 2025
18ffeb3
Remove success toast on comment deletion
ashilkn Dec 20, 2025
d0a473f
Refactor CommentsScreen to FileCommentsScreen
ashilkn Dec 21, 2025
de70f34
Add collection selector for file comments
ashilkn Dec 21, 2025
d3dc0ad
Add likes bottom sheet on long press of heart icon
ashilkn Dec 21, 2025
9ef09c1
Fix collection selector layout in likes bottom sheet
ashilkn Dec 21, 2025
f09d860
Fix initial height flash in likes bottom sheet
ashilkn Dec 21, 2025
0939f05
Refactor likes bottom sheet to use StatelessWidgets
ashilkn Dec 22, 2025
c739d59
Add error handling and extract constants in likes bottom sheet
ashilkn Dec 22, 2025
9f88498
Improve likes bottom sheet styling and current user display
ashilkn Dec 22, 2025
2f40d70
Add support for letting user choose which collection-scope the like t…
ashilkn Dec 23, 2025
693da3d
initial integration for server api
ua741 Dec 30, 2025
f320982
feed 1/n
ua741 Dec 30, 2025
ae46658
Add Feed feature for social activity (#8549)
ua741 Dec 30, 2025
c34097a
2/n feed
ua741 Dec 30, 2025
d550d7b
[mob][photos] More feed changes (#8551)
ua741 Dec 30, 2025
fc25979
Feed 3/n
ua741 Dec 30, 2025
36965dd
[mob][photos] Feed 4/n
ua741 Dec 30, 2025
dd94623
[mob][photos] Minor improvement for feed (#8554)
ua741 Dec 30, 2025
cac5c7d
Enable multiline input and tap-to-dismiss keyboard in comments
ashilkn Dec 30, 2025
685d3ed
Redesign like collection selector sheet to match Figma
ashilkn Dec 31, 2025
e875a5b
Fix close button style and reduce top spacing in like sheet
ashilkn Dec 31, 2025
d6e72aa
Fix close button style and dark theme heart container visibility
ashilkn Dec 31, 2025
7120090
Use larger font size for Like title to match Figma design
ashilkn Dec 31, 2025
d2bf2e8
Redesign feed preview CTA to match Figma design
ashilkn Dec 31, 2025
ad571f0
Redesign feed screen layout to match Figma design
ashilkn Dec 31, 2025
50e177f
Fix feed timeline dashed line to match Figma specs
ashilkn Dec 31, 2025
2b81e17
Refactor like selector sheet to use extracted widgets for better perf…
ashilkn Dec 31, 2025
dcbb364
Add enable comments setting to public link management
ashilkn Jan 1, 2026
9407f3a
Set enableComment to true by default for public links
ashilkn Jan 1, 2026
51b4830
Fix enableComment defaults for backwards compatibility
ashilkn Jan 1, 2026
b622098
Cleanup social data when collection is deleted
ashilkn Jan 1, 2026
e812d53
Add 500 character limit to comment input
ashilkn Jan 1, 2026
58e1458
Fix bottom bar icon alignment for non-shared files
ashilkn Jan 1, 2026
5c45254
Let admin/owner delete anon comments
ua741 Jan 1, 2026
53ea9c9
Minor fixes
ua741 Jan 1, 2026
aa52f7e
Resolve merge conflicts and merge main
ashilkn Jan 1, 2026
05a8ab6
[mob][photos] Minor fixes (#8575)
ua741 Jan 1, 2026
f77d21b
Move Add to Album to popup menu when social icons are shown
ashilkn Jan 2, 2026
f8440bc
Add double tap to like and swipe right to reply on comment bubbles
ashilkn Jan 2, 2026
3d2c5a9
Fix comment overlay positioning for wide and narrow bubbles
ashilkn Jan 2, 2026
7a757c4
Add exponential backoff retry to social data cleanup
ashilkn Jan 5, 2026
258a46a
Add manual sync triggers to social debug settings
ashilkn Jan 5, 2026
935dd34
Filter hidden collections from feed
ashilkn Jan 5, 2026
437bc73
Filter hidden collections from album selector dropdown
ashilkn Jan 5, 2026
3f3c619
Gate social features behind internalUser flag
ashilkn Jan 5, 2026
09edca9
Resolve merge conflicts and merge main
ashilkn Jan 5, 2026
c68f190
Update social db name
ashilkn Jan 5, 2026
577c052
Remove example seed data
ashilkn Jan 5, 2026
59c4039
chore
ashilkn Jan 5, 2026
9f9b344
chore
ashilkn Jan 5, 2026
a23fec3
Fix incorrect log message in syncFileSocialData
ashilkn Jan 5, 2026
e26c255
Change deleted parent comment display to "(deleted)" with italics
ashilkn Jan 6, 2026
0597982
Add error handling for social interactions
ashilkn Jan 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions mobile/apps/photos/lib/db/files_db.dart
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,56 @@ class FilesDB with SqlDbBase {
return ids;
}

/// Checks which (fileID, collectionID) pairs exist in the database.
///
/// Returns a set of keys in the format "collectionID_fileID" for files that exist.
/// This is more efficient than calling getUploadedFile() for each pair.
Future<Set<String>> getExistingFileKeys(
Set<(int fileID, int collectionID)> pairs,
) async {
if (pairs.isEmpty) return {};

final db = await instance.sqliteAsyncDB;
final existingKeys = <String>{};

// Build a query with OR conditions for each pair
// SQLite has a limit on compound SELECT statements, so we batch
const batchSize = 100;
final pairsList = pairs.toList();

for (var i = 0; i < pairsList.length; i += batchSize) {
final batch = pairsList.sublist(
i,
i + batchSize > pairsList.length ? pairsList.length : i + batchSize,
);

final conditions = batch
.map(
(_) => '($columnUploadedFileID = ? AND $columnCollectionID = ?)',
)
.join(' OR ');

final args = <Object>[];
for (final (fileID, collectionID) in batch) {
args.add(fileID);
args.add(collectionID);
}

final results = await db.getAll(
'SELECT $columnUploadedFileID, $columnCollectionID FROM $filesTable WHERE $conditions',
args,
);

for (final row in results) {
final fileID = row[columnUploadedFileID] as int;
final collectionID = row[columnCollectionID] as int;
existingKeys.add('${collectionID}_$fileID');
}
}

return existingKeys;
}

Future<(Set<int>, Map<String, int>)> getUploadAndHash(
int collectionID,
) async {
Expand Down
Loading