[fix] Fix the initialization issue

This commit is contained in:
Anas Elgarhy 2023-05-25 23:02:55 +03:00
parent 48de076872
commit c91af211de
No known key found for this signature in database
GPG key ID: 0501802A1D496528

View file

@ -62,7 +62,6 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
}
private void setupTheUI() throws IOException {
updateAhaDetails();
previousButton.setEnabled(ayah.getNumber() != 1 && ayah.getSurah().getNumber() != 1);
nextButton.setEnabled(ayah.getNumber() != Constants.AYAHS_COUNT && ayah.getSurah().getNumber() != Constants.SURAS_COUNT);
@ -83,6 +82,8 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
// Set the default selected item for the editionComboBox
editionComboBoxModel.setSelectedItem(new ReadableEdition(ayah.getEdition()));
// Set the actual information about the ayah in the UI
updateAhaDetails();
}
private void updateAhaDetails() {