Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit 5f2e5c1

Browse files
Update PojavLoginActivity.java
1 parent 189f966 commit 5f2e5c1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

app_pojavlauncher/src/main/java/net/kdt/pojavlaunch/PojavLoginActivity.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,10 @@ public void onSuccess(MinecraftAccount out) {
773773
}
774774
}
775775
});
776+
777+
// Tiny trick to avoid 'const' field
778+
final int accountIndex_final = accountIndex;
779+
776780
removeButton.setOnClickListener(new View.OnClickListener() {
777781
final String selectedAccName = accountName.getText().toString();
778782
@Override
@@ -785,7 +789,7 @@ public void onClick(View v) {
785789
@Override
786790
public void onClick(DialogInterface p1, int p2) {
787791
new InvalidateTokenTask(PojavLoginActivity.this).execute(selectedAccName);
788-
accountListLayout.removeViewsInLayout(accountIndex, 1);
792+
accountListLayout.removeViewsInLayout(accountIndex_final, 1);
789793
//Resize the window
790794
accountDialog.getWindow().setLayout((int)(xScreen*0.4),(int) Math.min((yScreen*0.8), (73 + accountListLayout.getChildCount()*55)*(PojavLoginActivity.this.getResources().getDisplayMetrics().densityDpi/160f) ));
791795
}

0 commit comments

Comments
 (0)