Skip to content

Commit cc465bc

Browse files
committed
cleanup: remove unused groupAssociatedFiles state
Grouping is now driven entirely by the rawStatus filter (GroupVariants or migrated RawOverNonRaw). The separate boolean toggle had no UI and defaulted to false, so it was dead code.
1 parent b07f641 commit cc465bc

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

src/App.tsx

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,6 @@ function App() {
250250
rawStatus: RawStatus.All,
251251
});
252252
const [supportedTypes, setSupportedTypes] = useState<SupportedTypes | null>(null);
253-
const [groupAssociatedFiles, setGroupAssociatedFiles] = useState(false);
254253
const [groupPreferredType, setGroupPreferredType] = useState<GroupPreference>('raw');
255254
const [selectedImage, setSelectedImage] = useState<SelectedImage | null>(null);
256255
const selectedImagePathRef = useRef<string | null>(null);
@@ -1044,8 +1043,7 @@ function App() {
10441043
};
10451044

10461045
const isGroupingActive = filterCriteria.rawStatus === RawStatus.GroupVariants ||
1047-
filterCriteria.rawStatus === RawStatus.RawOverNonRaw || // migration: treat old setting as grouping
1048-
groupAssociatedFiles;
1046+
filterCriteria.rawStatus === RawStatus.RawOverNonRaw; // migration: treat old setting as grouping
10491047

10501048
const groupingResult: GroupingResult | null = useMemo(() => {
10511049
if (!isGroupingActive) return null;
@@ -1577,9 +1575,6 @@ function App() {
15771575
if (settings?.waveformHeight !== undefined) {
15781576
setWaveformHeight(settings.waveformHeight);
15791577
}
1580-
if (typeof settings?.groupAssociatedFiles === 'boolean') {
1581-
setGroupAssociatedFiles(settings.groupAssociatedFiles);
1582-
}
15831578
if (settings?.groupPreferredType) {
15841579
setGroupPreferredType(settings.groupPreferredType);
15851580
}
@@ -1706,17 +1701,13 @@ function App() {
17061701
if (isInitialMount.current || !appSettings) {
17071702
return;
17081703
}
1709-
if (
1710-
appSettings.groupAssociatedFiles !== groupAssociatedFiles ||
1711-
appSettings.groupPreferredType !== groupPreferredType
1712-
) {
1704+
if (appSettings.groupPreferredType !== groupPreferredType) {
17131705
handleSettingsChange({
17141706
...appSettings,
1715-
groupAssociatedFiles,
17161707
groupPreferredType,
17171708
});
17181709
}
1719-
}, [groupAssociatedFiles, groupPreferredType, appSettings, handleSettingsChange]);
1710+
}, [groupPreferredType, appSettings, handleSettingsChange]);
17201711

17211712
useEffect(() => {
17221713
if (!appSettings?.adaptiveEditorTheme || !selectedImage) {

0 commit comments

Comments
 (0)