Skip to content

Commit a373c72

Browse files
committed
ModItemAdapter.java:405: error: static declarations not allowed in inner classes private enum InstallButtonState { INSTALL, INSTALLED, UPDATE, DOWNGRADE }
1 parent c0b8264 commit a373c72

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/modloaders/modpacks/ModItemAdapter.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,10 +401,16 @@ private void updateExtendedButtonLabel() {
401401
break;
402402
}
403403
}
404-
405-
private enum InstallButtonState { INSTALL, INSTALLED, UPDATE, DOWNGRADE }
406404
}
407405

406+
/**
407+
* Install button states for the search/install screen — moved out of the
408+
* (non-static) ViewHolder inner class since Java forbids static
409+
* declarations, which an enum implicitly is, inside non-static inner
410+
* classes.
411+
*/
412+
private enum InstallButtonState { INSTALL, INSTALLED, UPDATE, DOWNGRADE }
413+
408414
/**
409415
* The view holder used to hold the progress bar at the end of the list
410416
*/

0 commit comments

Comments
 (0)