fix flic handler functions

This commit is contained in:
cpu
2025-03-28 06:26:06 +01:00
parent e14c12ce66
commit 0414bdb217

View File

@@ -166,16 +166,7 @@ export function handleFlicAction(action, buttonId, timestamp) {
if (handler && typeof handler === 'function') { if (handler && typeof handler === 'function') {
console.log(`[PushFlic] Executing handler for ${action}`); console.log(`[PushFlic] Executing handler for ${action}`);
// Execute the handler registered in app.js // Execute the handler registered in app.js
switch(action) { handler(); // Use the handler function directly instead of hardcoded function calls
case FLIC_ACTIONS.SINGLE_CLICK:
nextPlayer();
break;
case FLIC_ACTIONS.DOUBLE_CLICK:
previousPlayer();
break;
case FLIC_ACTIONS.HOLD:
togglePauseResume();
}
} else { } else {
console.warn(`[PushFlic] No handler registered for action: ${action}`); console.warn(`[PushFlic] No handler registered for action: ${action}`);
} }