From ed9693c27bb84e015ef3d1a4474233b0da84f365 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Fri, 29 Sep 2023 16:34:10 -0500 Subject: [PATCH] comment out dead code and prepare function for moving to right index --- src/qml/presenter/Library.qml | 44 +++++++++++++++++------------------ src/qml/presenter/Slide.qml | 8 +++++++ 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/src/qml/presenter/Library.qml b/src/qml/presenter/Library.qml index f7b8051..ac21c1d 100644 --- a/src/qml/presenter/Library.qml +++ b/src/qml/presenter/Library.qml @@ -409,26 +409,26 @@ Item { } } - function addHtml(url) { - console.log("adding an html"); - var pageCount = 1; - web.runJavaScript("Reveal.getSlides()", function(result) { - let str = ''; - for (const [p, val] of Object.entries(result[0])) { - str += `${p}::${val}\n`; - } - console.log(str); - pageCount = result.length; - console.log(pageCount); - presProxyModel.presentationModel.newItem(url, pageCount); - selectedLibrary = "presentation"; - presentationLibrary.libraryList.currentIndex = presProxyModel.presentationModel.count(); - console.log(presProxyModel.getPresentation(presentationLibrary.libraryList.currentIndex)); - const presentation = presProxyModel.getPresentation(presentationLibrary.libraryList.currentIndex); - showPassiveNotification("newest image: " + presentation.title); - if (!editMode) - editMode = true; - editSwitch("presentation", presentation); - }); - } + /* function addHtml(url) { */ + /* console.log("adding an html"); */ + /* var pageCount = 1; */ + /* web.runJavaScript("Reveal.getSlides()", function(result) { */ + /* let str = ''; */ + /* for (const [p, val] of Object.entries(result[0])) { */ + /* str += `${p}::${val}\n`; */ + /* } */ + /* console.log(str); */ + /* pageCount = result.length; */ + /* console.log(pageCount); */ + /* presProxyModel.presentationModel.newItem(url, pageCount); */ + /* selectedLibrary = "presentation"; */ + /* presentationLibrary.libraryList.currentIndex = presProxyModel.presentationModel.count(); */ + /* console.log(presProxyModel.getPresentation(presentationLibrary.libraryList.currentIndex)); */ + /* const presentation = presProxyModel.getPresentation(presentationLibrary.libraryList.currentIndex); */ + /* showPassiveNotification("newest image: " + presentation.title); */ + /* if (!editMode) */ + /* editMode = true; */ + /* editSwitch("presentation", presentation); */ + /* }); */ + /* } */ } diff --git a/src/qml/presenter/Slide.qml b/src/qml/presenter/Slide.qml index d91fce9..c67a901 100644 --- a/src/qml/presenter/Slide.qml +++ b/src/qml/presenter/Slide.qml @@ -181,6 +181,14 @@ Item { if (loadRequest.status == 2) showPassiveNotification("yahoo?"); } + + /* function moveToSlideIndex(index) { */ + /* web.runJavaScript(" */ + /* const index */ + /* for (let i = 0; i < index; i++) { */ + /* Reveal.next(); */ + /* }") */ + /* } */ } }