mirror of
https://github.com/anas-elgarhy/Ayah-intellij.git
synced 2024-08-15 00:43:43 +00:00
[fix] Fix the editions sel method for combo boxes models setup
This commit is contained in:
parent
5cf3890c02
commit
39c5978d0f
1 changed files with 4 additions and 5 deletions
|
@ -2,9 +2,8 @@ package com.anas.intellij.plugins.ayah.dialogs;
|
|||
|
||||
import com.anas.alqurancloudapi.Ayah;
|
||||
import com.anas.alqurancloudapi.consts.Constants;
|
||||
import com.anas.alqurancloudapi.consts.Surahs;
|
||||
import com.anas.alqurancloudapi.edition.Edition;
|
||||
import com.anas.alqurancloudapi.edition.EditionType;
|
||||
import com.anas.alqurancloudapi.edition.EditionFormat;
|
||||
import com.anas.intellij.plugins.ayah.audio.AudioPlayer;
|
||||
import com.anas.intellij.plugins.ayah.audio.PlayerListener;
|
||||
import com.anas.intellij.plugins.ayah.settings.userinterface.ReadableEdition;
|
||||
|
@ -70,10 +69,10 @@ public class AyahDetailsDialog extends JDialog implements PlayerListener {
|
|||
final var editionComboBoxModel = new DefaultComboBoxModel<ReadableEdition>();
|
||||
|
||||
Arrays.stream(Edition.getEditions()).forEach(edition -> {
|
||||
if (edition.getType() == EditionType.TAFSIR || edition.getType() == EditionType.TRANSLATION) {
|
||||
tafserAndTranslationComboBoxModel.addElement(new ReadableEdition(edition));
|
||||
} else {
|
||||
if (edition.getFormat() == EditionFormat.AUDIO) {
|
||||
editionComboBoxModel.addElement(new ReadableEdition(edition));
|
||||
} else {
|
||||
tafserAndTranslationComboBoxModel.addElement(new ReadableEdition(edition));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue