Skip to content

Commit

Permalink
Restore image file selection LED-drive pathing
Browse files Browse the repository at this point in the history
Change-type: patch
Signed-off-by: Lorenzo Alberto Maria Ambrosi <lorenzothunder.ambrosi@gmail.com>
  • Loading branch information
thundron committed Sep 2, 2021
1 parent b97f4e0 commit f46963b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/gui/app/models/leds.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,12 @@
import * as _ from 'lodash';
import { Animator, AnimationFunction, Color, RGBLed } from 'sys-class-rgb-led';

import { DrivelistDrive } from '../../../shared/drive-constraints';
import {
DrivelistDrive,
isSourceDrive,
} from '../../../shared/drive-constraints';
import { getDrives } from './available-drives';
import { getImage, getSelectedDrives } from './selection-state';
import { getSelectedDrives } from './selection-state';
import * as settings from './settings';
import { observe, store } from './store';

Expand Down Expand Up @@ -172,7 +175,9 @@ function stateObserver() {
const availableDrives = getDrives().filter(
(d: DrivelistDrive) => d.devicePath,
);
const sourceDrivePath = getImage()?.drive?.devicePath;
const sourceDrivePath = availableDrives.filter((d: DrivelistDrive) =>
isSourceDrive(d, s.selection.image),
)[0]?.devicePath;
const availableDrivesPaths = availableDrives.map(
(d: DrivelistDrive) => d.devicePath,
);
Expand Down

0 comments on commit f46963b

Please sign in to comment.