mirror of
https://github.com/immich-app/immich
synced 2025-11-14 17:36:12 +00:00
fix: user profile images not working in beta timeline (#20203)
* fix user icons in album view * revert updateUsersV1 change * fix: UserDto merge issues * fix: update user entity * revert what I thought were merge issues turns out drift cant figure out when it needs to gen a file... * fix removed line * handle defaults for older servers * feat: checkpoint migrations * fix: use parenthesis instead of brackets * Update 1753800911775-ProfileImageCheckpointRemoval.ts * fix: sync stream updateUsersV1
This commit is contained in:
parent
da5deffd03
commit
097e132fba
29 changed files with 7069 additions and 282 deletions
|
|
@ -50,12 +50,10 @@ class User {
|
|||
isAdmin: dto.isAdmin,
|
||||
isPartnerSharedBy: dto.isPartnerSharedBy,
|
||||
isPartnerSharedWith: dto.isPartnerSharedWith,
|
||||
profileImagePath: dto.profileImagePath ?? "",
|
||||
profileImagePath: dto.hasProfileImage ? "HAS_PROFILE_IMAGE" : "",
|
||||
avatarColor: dto.avatarColor,
|
||||
memoryEnabled: dto.memoryEnabled,
|
||||
inTimeline: dto.inTimeline,
|
||||
quotaUsageInBytes: dto.quotaUsageInBytes,
|
||||
quotaSizeInBytes: dto.quotaSizeInBytes,
|
||||
);
|
||||
|
||||
UserDto toDto() => UserDto(
|
||||
|
|
@ -64,12 +62,13 @@ class User {
|
|||
name: name,
|
||||
isAdmin: isAdmin,
|
||||
updatedAt: updatedAt,
|
||||
profileImagePath: profileImagePath.isEmpty ? null : profileImagePath,
|
||||
avatarColor: avatarColor,
|
||||
memoryEnabled: memoryEnabled,
|
||||
inTimeline: inTimeline,
|
||||
isPartnerSharedBy: isPartnerSharedBy,
|
||||
isPartnerSharedWith: isPartnerSharedWith,
|
||||
hasProfileImage: profileImagePath.isNotEmpty,
|
||||
profileChangedAt: updatedAt,
|
||||
quotaUsageInBytes: quotaUsageInBytes,
|
||||
quotaSizeInBytes: quotaSizeInBytes,
|
||||
);
|
||||
|
|
@ -82,11 +81,11 @@ class UserEntity extends Table with DriftDefaultsMixin {
|
|||
TextColumn get name => text()();
|
||||
BoolColumn get isAdmin => boolean().withDefault(const Constant(false))();
|
||||
TextColumn get email => text()();
|
||||
TextColumn get profileImagePath => text().nullable()();
|
||||
|
||||
BoolColumn get hasProfileImage => boolean().withDefault(const Constant(false))();
|
||||
DateTimeColumn get profileChangedAt => dateTime().withDefault(currentDateAndTime)();
|
||||
|
||||
DateTimeColumn get updatedAt => dateTime().withDefault(currentDateAndTime)();
|
||||
// Quota
|
||||
IntColumn get quotaSizeInBytes => integer().nullable()();
|
||||
IntColumn get quotaUsageInBytes => integer().withDefault(const Constant(0))();
|
||||
|
||||
@override
|
||||
Set<Column> get primaryKey => {id};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue