feat(web): show partners assets on the main timeline (#4933)

This commit is contained in:
Alex 2023-11-11 15:06:19 -06:00 committed by GitHub
parent 3b11854702
commit 35767591d2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
59 changed files with 1929 additions and 172 deletions

View file

@ -18,11 +18,12 @@ class User {
this.isPartnerSharedWith = false,
this.profileImagePath = '',
this.memoryEnabled = true,
this.inTimeline = false,
});
Id get isarId => fastHash(id);
User.fromDto(UserResponseDto dto)
User.fromUserDto(UserResponseDto dto)
: id = dto.id,
updatedAt = dto.updatedAt,
email = dto.email,
@ -34,6 +35,19 @@ class User {
isAdmin = dto.isAdmin,
memoryEnabled = dto.memoriesEnabled;
User.fromPartnerDto(PartnerResponseDto dto)
: id = dto.id,
updatedAt = dto.updatedAt,
email = dto.email,
firstName = dto.firstName,
lastName = dto.lastName,
isPartnerSharedBy = false,
isPartnerSharedWith = false,
profileImagePath = dto.profileImagePath,
isAdmin = dto.isAdmin,
memoryEnabled = dto.memoriesEnabled,
inTimeline = dto.inTimeline;
@Index(unique: true, replace: false, type: IndexType.hash)
String id;
DateTime updatedAt;
@ -45,6 +59,8 @@ class User {
bool isAdmin;
String profileImagePath;
bool? memoryEnabled;
bool? inTimeline;
@Backlink(to: 'owner')
final IsarLinks<Album> albums = IsarLinks<Album>();
@Backlink(to: 'sharedUsers')
@ -62,7 +78,8 @@ class User {
isPartnerSharedWith == other.isPartnerSharedWith &&
profileImagePath == other.profileImagePath &&
isAdmin == other.isAdmin &&
memoryEnabled == other.memoryEnabled;
memoryEnabled == other.memoryEnabled &&
inTimeline == other.inTimeline;
}
@override
@ -77,5 +94,6 @@ class User {
isPartnerSharedWith.hashCode ^
profileImagePath.hashCode ^
isAdmin.hashCode ^
memoryEnabled.hashCode;
memoryEnabled.hashCode ^
inTimeline.hashCode;
}