fix: Expose gallery and media views as media type agnostic (#2335)
This commit is contained in:
@@ -18,7 +18,6 @@ export const getCameraIDsForViewName = (
|
||||
switch (viewName) {
|
||||
case 'diagnostics':
|
||||
case 'image':
|
||||
case 'media':
|
||||
return cameraManager.getStore().getCameraIDs();
|
||||
|
||||
case 'folder':
|
||||
@@ -51,11 +50,13 @@ export const getCameraIDsForViewName = (
|
||||
? cameraManager.getStore().getAllDependentCameras(cameraID, capability, options)
|
||||
: cameraManager.getStore().getCameraIDsWithCapability(capability, options);
|
||||
|
||||
case 'gallery':
|
||||
case 'media':
|
||||
case 'timeline':
|
||||
return folder
|
||||
? cameraManager.getStore().getCameraIDs()
|
||||
: cameraManager.getStore().getCameraIDsWithCapability({
|
||||
anyCapabilities: ['clips', 'snapshots', 'recordings'],
|
||||
anyCapabilities: ['clips', 'snapshots', 'recordings', 'reviews'],
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
+8
-3
@@ -127,9 +127,14 @@ export class View {
|
||||
* Determine if a view is a gallery.
|
||||
*/
|
||||
public isGalleryView(): boolean {
|
||||
return ['clips', 'folders', 'snapshots', 'recordings', 'reviews'].includes(
|
||||
this.view,
|
||||
);
|
||||
return [
|
||||
'clips',
|
||||
'folders',
|
||||
'gallery',
|
||||
'snapshots',
|
||||
'recordings',
|
||||
'reviews',
|
||||
].includes(this.view);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user