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 managerAppContext = appContext.getContext();
managerAppContext.selectedConfiguration.languages.forEach((element) { managerAppContext.selectedConfiguration.languages.forEach((element) {
var translationDTO = new TranslationDTO(); var translationTitleDTO = new TranslationDTO();
translationDTO.language = element; translationTitleDTO.language = element;
translationDTO.value = ""; translationTitleDTO.value = "";
imageDTO.title.add(translationDTO);
imageDTO.description.add(translationDTO); 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( return MapConfig(
initialValue: sectionDTO.data, initialValue: sectionDTO.data,
onChanged: (String data) { onChanged: (String data) {
print(data);
sectionDTO.data = data; sectionDTO.data = data;
save(false, sectionDTO, appContext); save(false, sectionDTO, appContext);
}, },
@ -326,6 +325,7 @@ class _SectionDetailScreenState extends State<SectionDetailScreen> {
initialValue: sectionDTO.data, initialValue: sectionDTO.data,
onChanged: (String data) { onChanged: (String data) {
sectionDTO.data = data; sectionDTO.data = data;
save(false, sectionDTO, appContext);
}, },
); );
case SectionType.video: case SectionType.video: