fix(web): asset selection on memories page is broken (#16759)
* 16712: Proper intialisation of the memory store to avoid loading up duplicate object refs of the same asset. * 16712: Add auth to memory mapping so isFavorite is actually return correctly from the server. * 16712: Move logic that belongs in the store into the store. * 16712: Cleanup. * 16712: Fix init behaviour. * 16712: Add comment. * 16712: Make method private. * 16712: Fix import. * 16712: Fix format. * 16712: Cleaner if/else and fix typo. * fix: icon size mismatch * 16712: Fixed up state machine managing memory playback: * Updated to `Tween` (`tweened` was deprecated) * Removed `resetPromise`. Setting progressController to 0 had the same effect, so not really sure why it was there? * Removed the many duplicate places the `handleAction` method was called. Now we just called it on `afterNavigate` as well as when `galleryInView` or `$isViewing` state changes. * 16712: Add aria tag. * 16712: Fix memory player duplicate invocation bugs. Now we should only call 'reset' and 'play' once, after navigate/page load. This should hopefully fix all the various bugs around playback. * 16712: Cleanup * 16712: Cleanup * 16712: Cleanup * 16712: Cleanup --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
@@ -74,13 +74,13 @@ export class MemoryService extends BaseService {
|
||||
|
||||
async search(auth: AuthDto, dto: MemorySearchDto) {
|
||||
const memories = await this.memoryRepository.search(auth.user.id, dto);
|
||||
return memories.map((memory) => mapMemory(memory));
|
||||
return memories.map((memory) => mapMemory(memory, auth));
|
||||
}
|
||||
|
||||
async get(auth: AuthDto, id: string): Promise<MemoryResponseDto> {
|
||||
await this.requireAccess({ auth, permission: Permission.MEMORY_READ, ids: [id] });
|
||||
const memory = await this.findOrFail(id);
|
||||
return mapMemory(memory);
|
||||
return mapMemory(memory, auth);
|
||||
}
|
||||
|
||||
async create(auth: AuthDto, dto: MemoryCreateDto) {
|
||||
@@ -104,7 +104,7 @@ export class MemoryService extends BaseService {
|
||||
allowedAssetIds,
|
||||
);
|
||||
|
||||
return mapMemory(memory);
|
||||
return mapMemory(memory, auth);
|
||||
}
|
||||
|
||||
async update(auth: AuthDto, id: string, dto: MemoryUpdateDto): Promise<MemoryResponseDto> {
|
||||
@@ -116,7 +116,7 @@ export class MemoryService extends BaseService {
|
||||
seenAt: dto.seenAt,
|
||||
});
|
||||
|
||||
return mapMemory(memory);
|
||||
return mapMemory(memory, auth);
|
||||
}
|
||||
|
||||
async remove(auth: AuthDto, id: string): Promise<void> {
|
||||
|
||||
Reference in New Issue
Block a user