Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable addNote button, by letting it edit highlight #4773

Merged
merged 4 commits into from Mar 12, 2019
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 5 additions & 2 deletions frontend/apps/reader/modules/readerhighlight.lua
Expand Up @@ -721,7 +721,6 @@ function ReaderHighlight:onHoldRelease()
},
{
text = _("Add Note"),
enabled = false,
callback = function()
self:addNote()
Galunid marked this conversation as resolved.
Show resolved Hide resolved
self:onClose()
Expand Down Expand Up @@ -946,6 +945,7 @@ function ReaderHighlight:saveHighlight()
if self.selected_text.pboxes then
self:exportToDocument(page, hl_item)
end
return page, #self.view.highlight.saved[page]
end
end

Expand Down Expand Up @@ -974,7 +974,10 @@ function ReaderHighlight:exportToDocument(page, item)
end

function ReaderHighlight:addNote()
self:handleEvent(Event:new("addNote"))
self.ui:handleEvent(Event:new("AddNote"))
Galunid marked this conversation as resolved.
Show resolved Hide resolved
local page, index = self:saveHighlight()
self:editHighlight(page, index)
UIManager:close(self.edit_highlight_dialog)
logger.dbg("add Note")
end

Expand Down