Fix translations bugs in slider

This commit is contained in:
Thomas Fransolet 2021-07-27 18:00:08 +02:00
parent 1671bf413d
commit 25b3c1546c
2 changed files with 11 additions and 6 deletions

View File

@ -19,11 +19,16 @@ Future<ImageDTO> showNewOrUpdateImageSlider(ImageDTO inputImageDTO, AppContext a
ManagerAppContext managerAppContext = appContext.getContext();
managerAppContext.selectedConfiguration.languages.forEach((element) {
var translationDTO = new TranslationDTO();
translationDTO.language = element;
translationDTO.value = "";
imageDTO.title.add(translationDTO);
imageDTO.description.add(translationDTO);
var translationTitleDTO = new TranslationDTO();
translationTitleDTO.language = element;
translationTitleDTO.value = "";
var translationDescriptionDTO = new TranslationDTO();
translationDescriptionDTO.language = element;
translationDescriptionDTO.value = "";
imageDTO.title.add(translationTitleDTO);
imageDTO.description.add(translationDescriptionDTO);
});
}

View File

@ -316,7 +316,6 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
return MapConfig(
initialValue: sectionDTO.data,
onChanged: (String data) {
print(data);
sectionDTO.data = data;
save(false, sectionDTO, appContext);
},
@ -326,6 +325,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
initialValue: sectionDTO.data,
onChanged: (String data) {
sectionDTO.data = data;
save(false, sectionDTO, appContext);
},
);
case SectionType.video: