Updated API for Dragon Bones (100022)

Jayden Platell [01-18-21 - 21:25]
Updated API for Dragon Bones (100022)
Fixed issue with ZOS function LoreReader, and new issue with ZO_SceneManager.
Currently closes back to UI and not Librarian list, will update that soon.
Filename
Changelog
Librarian.lua
Librarian.txt
diff --git a/Changelog b/Changelog
index 5a94b9d..6ecef25 100644
--- a/Changelog
+++ b/Changelog
@@ -1,6 +1,11 @@
 -------------------------------------------------------------------------------
-Librarian v1.9 9/10/17
+Librarian v2.0 2/12/18
 -------------------------------------------------------------------------------
+2.0 (2/12/18)
+- Updated API for Dragon Bones (100022)
+- Fixed issue with ZOS function LoreReader, and new issue with ZO_SceneManager. Currently closes back to
+UI and not Librarian list, will update that soon.
+
 1.9 (9/10/17)
 - Updated API for Horns Of The Reach (100020)
 - Updated LAM to 2.0 r24
diff --git a/Librarian.lua b/Librarian.lua
index 87b34db..b578755 100644
--- a/Librarian.lua
+++ b/Librarian.lua
@@ -149,22 +149,22 @@ function Librarian:AddLoreReaderUnreadToggle()
     self.unreadIndicator:SetHidden(true)
     self.unreadIndicator:SetTexture([[EsoUI/Art/Inventory/newitem_icon.dds]])

-    local function OnSceneStateChange(oldState, newState)
+    local function OnSceneStateChange(scene, oldState, newState)
         if(newState == SCENE_SHOWING) then
-            if KEYBIND_STRIP.defaultExit then
-                KEYBIND_STRIP:RemoveKeybindButton(KEYBIND_STRIP.defaultExit)
-            else
-                KEYBIND_STRIP:RemoveDefaultExit()
-            end
+            --if KEYBIND_STRIP.defaultExit then
+                --KEYBIND_STRIP:RemoveKeybindButton(KEYBIND_STRIP.defaultExit)
+            --else
+              --  KEYBIND_STRIP:RemoveDefaultExit()
+            --end
             KEYBIND_STRIP:AddKeybindButtonGroup(readerKeybinds)
         elseif(newState == SCENE_HIDDEN) then
             KEYBIND_STRIP:RemoveKeybindButtonGroup(readerKeybinds)
-            if KEYBIND_STRIP.defaultExit then
+            --if KEYBIND_STRIP.defaultExit then
                 KEYBIND_STRIP:AddKeybindButton(KEYBIND_STRIP.defaultExit)
-            else
-                KEYBIND_STRIP:RestoreDefaultExit()
-            end
-        end
+           -- else
+               -- KEYBIND_STRIP:RestoreDefaultExit()
+            --end
+        end
     end

     LORE_READER_INTERACTION_SCENE.callbackRegistry.StateChange[1][3] = true
@@ -513,8 +513,9 @@ end

 function Librarian:ReadBook(title)
     local book = self:FindBook(title)
-    LoreReader:SetupBook(book.title, book.body and table.concat(book.body), book.medium, book.showTitle)
-    SCENE_MANAGER:Push("loreReaderInteraction")
+    LORE_READER:SetupBook(book.title, book.body and table.concat(book.body), book.medium, book.showTitle)
+        SCENE_MANAGER:Push("loreReaderInteraction")
+
     -- PlaySound(LORE_READER.OpenSound)
 end

diff --git a/Librarian.txt b/Librarian.txt
index a18873e..df3f5dc 100644
--- a/Librarian.txt
+++ b/Librarian.txt
@@ -1,6 +1,6 @@
 ## Title: Librarian
 ## Author: |c4EFFF6Calia1120|r, Flamage
-## APIVersion: 100020
+## APIVersion: 100021 100022
 ## SavedVariables: Librarian_SavedVariables
 ## OptionalDependsOn: LibAddonMenu-2.0