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

[UX] Gesture manager: add action - clear location history #4716

Merged
merged 2 commits into from Mar 2, 2019

Conversation

Projects
None yet
2 participants
@poire-z
Copy link
Contributor

poire-z commented Mar 2, 2019

Also show notification when previous_location can't go back because the location stack is empty.
Ref #4687 (comment)

(I've put it in the menu, not just after Back to previous location, but after all the others that put stuff into this location stack, as some kind of self documentation.)

[UX] Gesture manager: add action - clear location history
Also show notification when previous_location can't go
back because the location stack is empty.
self.location_stack = {}
if show_notification then
UIManager:show(Notification:new{
text = _("Location history cleared"),

This comment has been minimized.

@Frenzie

Frenzie Mar 2, 2019

Member
Suggested change
text = _("Location history cleared"),
text = _("Location history cleared."),
local saved_location = table.remove(self.location_stack)
if saved_location then
logger.dbg("GoBack: restoring:", saved_location)
self.ui:handleEvent(Event:new('RestoreBookLocation', saved_location))
return true
elseif show_notification_if_empty then
UIManager:show(Notification:new{
text = _("Location history is empty"),

This comment has been minimized.

@Frenzie

Frenzie Mar 2, 2019

Member
Suggested change
text = _("Location history is empty"),
text = _("Location history is empty."),

@Frenzie Frenzie added this to the 2019.03 milestone Mar 2, 2019

@Frenzie Frenzie added the UX label Mar 2, 2019

@Frenzie Frenzie merged commit 93422d0 into koreader:master Mar 2, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@poire-z poire-z deleted the poire-z:clear_location_history branch Mar 2, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.