mirror of
https://github.com/immich-app/immich.git
synced 2025-12-18 01:11:07 +03:00
feat(web): show partners assets on the main timeline (#4933)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user