Custom button deletion uses wrong index
When deleting custom buttons, the method to remove a button from a configuration is called based on the button's index in the RecyclerView, not based on its keyCode. This causes the button to re-appear after reloading the app. The method call causing the issue is configuration.removeCommand(position);
in RemoteRecyclerAdapter.java
.
Steps to reproduce:
- Load a configuration with multiple custom buttons
- Delete the first custom button (index 0, keyCode 0)
- Delete the new first custom button (index 0, keyCode 1)
- Reload the app
- The button deleted in step 3 is loaded again. - Unexpected behaviour