Make Milkdrop window opening on initialization work the same as it does for other windows

This commit is contained in:
Jordan Eldredge 2025-06-19 10:38:44 -07:00
parent f0f8e88dd0
commit 7ff8aab8af
7 changed files with 1 additions and 25 deletions

View file

@ -75,7 +75,6 @@
return { name, butterchurnPresetObject: preset };
});
},
butterchurnOpen: true,
},
windowLayout: {
main: { position: { top: 0, left: 0 } },

View file

@ -99,6 +99,5 @@ export function getButterchurnOptions(
return { name, butterchurnPresetObject: preset as Object };
});
},
butterchurnOpen: !startWithMilkdropHidden,
};
}

View file

@ -59,8 +59,6 @@ function logEventFromAction(action: Action): GoogleAnalyticsEvent | null {
return { category: "Playlist", action: "ReverseList" };
case "RANDOMIZE_LIST":
return { category: "Playlist", action: "RandomizeList" };
case "ENABLE_MILKDROP":
return { category: "Windows", action: "EnableMilkdrop" };
case "TOGGLE_WINDOW_SHADE_MODE":
return {
category: "Windows",

View file

@ -72,7 +72,6 @@ export const LOAD_SERIALIZED_STATE = "LOAD_SERIALIZED_STATE";
export const RESET_WINDOW_SIZES = "RESET_WINDOW_SIZES";
export const BROWSER_WINDOW_SIZE_CHANGED = "BROWSER_WINDOW_SIZE_CHANGED";
export const LOAD_DEFAULT_SKIN = "LOAD_DEFAULT_SKIN";
export const ENABLE_MILKDROP = "ENABLE_MILKDROP";
export const SET_MILKDROP_DESKTOP = "SET_MILKDROP_DESKTOP";
export const SET_VISUALIZER_STYLE = "SET_VISUALIZER_STYLE";
export const GOT_BUTTERCHURN_PRESETS = "GOT_BUTTERCHURN_PRESETS";

View file

@ -10,7 +10,6 @@ import {
LOAD_SERIALIZED_STATE,
BROWSER_WINDOW_SIZE_CHANGED,
RESET_WINDOW_SIZES,
ENABLE_MILKDROP,
} from "../actionTypes";
import * as Utils from "../utils";
import { WindowsSerializedStateV1 } from "../serializedStates/v1Types";
@ -83,7 +82,7 @@ const defaultWindowsState: WindowsState = {
[WINDOWS.MILKDROP]: {
title: "Milkdrop",
size: [0, 0],
open: false,
open: true,
shade: false,
canResize: true,
canShade: false,
@ -105,17 +104,6 @@ const windows = (
action: Action
): WindowsState => {
switch (action.type) {
case ENABLE_MILKDROP:
return {
...state,
genWindows: {
...state.genWindows,
[WINDOWS.MILKDROP]: {
...state.genWindows[WINDOWS.MILKDROP],
open: action.open,
},
},
};
case SET_FOCUSED_WINDOW:
let windowOrder = state.windowOrder;
if (action.window != null) {

View file

@ -193,7 +193,6 @@ export interface ButterchurnOptions {
convertPreset(file: string, endpoint: string): Promise<Object>;
}>;
presetConverterEndpoint?: string;
butterchurnOpen: boolean;
}
export interface EqfPreset {
@ -510,7 +509,6 @@ export type Action =
| { type: "RESET_WINDOW_SIZES" }
| { type: "BROWSER_WINDOW_SIZE_CHANGED"; height: number; width: number }
| { type: "LOAD_DEFAULT_SKIN" }
| { type: "ENABLE_MILKDROP"; open: boolean }
| { type: "SCHEDULE_MILKDROP_MESSAGE"; message: string }
| {
type: "SET_MILKDROP_DESKTOP";

View file

@ -32,7 +32,6 @@ import {
LOADED,
SET_Z_INDEX,
CLOSE_REQUESTED,
ENABLE_MILKDROP,
} from "./actionTypes";
import Emitter from "./emitter";
@ -151,10 +150,6 @@ class Webamp {
}
if (options.__butterchurnOptions) {
this.store.dispatch({
type: ENABLE_MILKDROP,
open: options.__butterchurnOptions.butterchurnOpen,
});
this.store.dispatch(
Actions.initializePresets(options.__butterchurnOptions)
);