fix(mobile): Sorted shared album and added share user doesn't reflect change in album view (#1955)

* fix: sorted shared album

* Added TODO comment for tomorrow work

* update album shared property after adding user

---------

Co-authored-by: Fynn Petersen-Frey <zoodyy@users.noreply.github.com>
This commit is contained in:
Alex
2023-03-12 08:43:09 -05:00
committed by GitHub
parent ceb81d00fc
commit 416e30ede2
3 changed files with 16 additions and 4 deletions

View File

@@ -211,7 +211,11 @@ class AlbumService {
if (result != null) {
album.sharedUsers
.addAll((await _db.users.getAllById(sharedUserIds)).cast());
await _db.writeTxn(() => album.sharedUsers.save());
album.shared = result.shared;
await _db.writeTxn(() async {
await _db.albums.put(album);
await album.sharedUsers.save();
});
return true;
}
} catch (e) {