added the previous item change

This commit is contained in:
Chris Cochrun 2022-08-06 07:23:57 -05:00
parent 420d521494
commit 770e2f4593
3 changed files with 53 additions and 17 deletions

View file

@ -177,24 +177,38 @@ Item {
}
function previousSlideAction() {
print(textIndex);
if (itemType === "song") {
if (textIndex === 0) {
clearText();
nextSlide();
} else if (textIndex <= root.text.length) {
SlideObject.setText(root.text[textIndex]);
print(root.text[textIndex]);
--textIndex;
}
} else if (itemType === "video") {
/* clearText(); */
previousSlide();
}
else if (itemType === "image") {
/* clearText(); */
previousSlide();
const prevServiceItemIndex = currentServiceItem - 1;
const prevItem = serviceItemModel.getItem(prevServiceItemIndex);
print("currentServiceItem " + currentServiceItem);
print("prevServiceItem " + prevServiceItemIndex);
print(prevItem.name);
const changed = SlideObject.previous(prevItem);
print(changed);
if (changed) {
currentServiceItem--;
loadVideo();
}
/* print(textIndex); */
/* if (itemType === "song") { */
/* if (textIndex === 0) { */
/* clearText(); */
/* nextSlide(); */
/* } else if (textIndex <= root.text.length) { */
/* SlideObject.setText(root.text[textIndex]); */
/* print(root.text[textIndex]); */
/* --textIndex; */
/* } */
/* } else if (itemType === "video") { */
/* /\* clearText(); *\/ */
/* previousSlide(); */
/* } */
/* else if (itemType === "image") { */
/* /\* clearText(); *\/ */
/* previousSlide(); */
/* } */
}
function previousSlide() {