Skip to content

ListMenu: show mark for books with highlights#10276

Merged
hius07 merged 5 commits into
koreader:masterfrom
hius07:listmenu-highlight
Apr 2, 2023
Merged

ListMenu: show mark for books with highlights#10276
hius07 merged 5 commits into
koreader:masterfrom
hius07:listmenu-highlight

Conversation

@hius07

@hius07 hius07 commented Apr 1, 2023

Copy link
Copy Markdown
Member

01


This change is Reviewable

Comment on lines -674 to -681
-- No right widget by default, except in History
local wright
local wright_width = 0
local wright_right_padding = 0
if self.mandatory_func then
-- Currently only provided by History, giving the last time read.
-- If we have it, we need to build a more complex widget with
-- this date on the right

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are we losing by removing all this?
The last read date of deleted files ?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last read date of files that have been deleted and if no sql bookinfo found.

In the meantime the last read date is kept in history.lua, so it can be displayed, this requires some cnahges to the ListMneu logic.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the (technical only?) reason for removing these chunks of code?

@hius07 hius07 Apr 1, 2023

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no more mandatory_func in History.

mandatory = datetime.secondsToDateTime(input_time),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like I added mandatory_func just for that case? And your compulsive cleaning habits removed it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You added mandatory_func in #6593 to show the last read date.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mandatory_func is not needed in History after #10156.

@poire-z

poire-z commented Apr 1, 2023

Copy link
Copy Markdown
Contributor

Btw, I don't know since when, but when having Detailed list mode for History, I see no line separator between items:
image

while I see them in File browser:
image

@hius07

hius07 commented Apr 1, 2023

Copy link
Copy Markdown
Member Author

I see no line separator

I'll fix this.

style = "solid",
})
local line_widget = LineWidget:new{
dimen = Geom:new{ w = self.width or self.screen_w, h = Size.line.thin },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the primary reason for not seeing it (no self.width provided when called from History I guess), right? and the rest is just refactoring?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, caused with my 48e63c0.
Is it a bad refactoring, should be reverted?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it a bad refactoring, should be reverted?

No no, no problem with the refactoring and using a single LineWidget (I think we do that, reusing a single simple widget, in many places - I just checked that LineWidget does not update/use any dimen.x/y, so I guess that is fine).

I thought the self.width or self.screen_w might be not the best as there, as it's solving it that these precise places, and there could be other places that would use self.width - but looking precisely in ListMenu and MosaicMenu, I don't find any other use than these LineWidget, so ok.

@hius07

hius07 commented Apr 2, 2023

Copy link
Copy Markdown
Member Author

Restored the code to show the last read date for deleted files in History. Sorry.

@hius07 hius07 merged commit b7c4e1c into koreader:master Apr 2, 2023
@hius07 hius07 deleted the listmenu-highlight branch April 2, 2023 13:58
@hius07 hius07 added this to the 2023.04 milestone Apr 2, 2023
TranHHoang added a commit to TranHHoang/koreader that referenced this pull request May 26, 2023
KOReader 2023.04 "Solar Panel"

![koreader-2023-04-fs8](https://user-images.githubusercontent.com/202757/234975122-d7739c71-74aa-4cb0-a086-72a4bba70f52.png)

It's been another busy month squashing many bugs. Our Mac users will be happy to hear that I told macOS we've supported HiDPI since long before anyone came up with such terminology (koreader#10341), and that the program can now natively build on M1 devices (koreader#10291).

Solar panel credit: <https://openclipart.org/detail/294030/solar-energy> by gnokii

We'd like to thank all contributors for their efforts. Some highlights since the previous release include:

* Readerzooming: fix use of default settings (koreader#10205) @hius07
* ButtonDialog/ButtonDialogTitle: consistent 'width' handling (koreader#10230) @poire-z
* MovableContainer: add support for anchoring initial position (koreader#10230) @poire-z
* Book map, Page browser: add top left menu (koreader#10230) @poire-z
* Book style tweak: add button with CSS suggestions (koreader#10230) @poire-z
* crengine: fix parsing of multibytes encodings (koreader#10230) @poire-z
* readerstyletweak: update profiles on unregistering in dispatcher (koreader#10247) @hius07
* Filesearcher: add search in book metadata (koreader#10198) @hius07
* Fix: Updated legacy directory, which crashed the program (koreader#10260) @Mochitto
* ReaderLink: allow a forward location stack (koreader#10228) @yparitcher
* BookInfo: add page information (koreader#10255) @hius07
* Center pdf manual zoom mode (koreader#10246) @nairyosangha
* File browser: add Folder Menu (koreader#10275) @hius07
* Calendar view: add options to change start time of days (koreader#10254) @weijiuqiao
* filechooser: fix crash on "unreadable content" (koreader#10283) @hius07
* Sync book statistics: add to dispatcher (koreader#10285) @ptrm
* [plugin] Exporter: use util.getSafeFilename() to remove illegal characters from output filename (koreader#10282) @Mochitto
* readerbookmark: fix writing pdf annotation (koreader#10287) @hius07
* Folder Menu: sign for Home folder (koreader#10288) @hius07
* ListMenu: show mark for books with highlights (koreader#10276) @hius07
* Calendar view's day view: thicker separator at 00:00 (koreader#10289) @poire-z
* PageBrowser: tweak scrolling behaviour at book start/end (koreader#10289) @poire-z
* Make `kodev check` feature complete (koreader#8682) @yparitcher
* macOS: support for M1 building (koreader#10291) @ptrm
* Reader: do not apply font size and spacing out of range (koreader#10295, koreader#10307) @hius07
* File browser: show Folder Menu on long-press on Home icon (koreader#10298) @hius07
* SSH.koplugin: fix cant stop SSH server bug when pid file's stale (koreader#10300) @weijiuqiao
* PM: Optimize task queue handling around standby (koreader#10203) @zwim
* statistic.koplugin: fix today's timeline showing next day when within custom offset (koreader#10299) @weijiuqiao
* ReaderThumbnails: update cached page thumbnail on bookmark note change (koreader#10303) @hius07
* SDL: add multitouch support (koreader#10334) @Frenzie
* SDL: add HiDPI support (koreader#10341) @Frenzie
* BookInfo: fix crash on show cover (koreader#10315) @hius07
* Deal with table.pack corner-cases properly (koreader#10350) @NiLuJe
* Android: add Tagus Gea support (<koreader/android-luajit-launcher#412>) @Alfedi

[Full changelog](koreader/koreader@v2023.03...v2023.04) — [closed milestone issues](https://github.com/koreader/koreader/milestone/63?closed=1)

---

Installation instructions: [Android](https://github.com/koreader/koreader/wiki/Installation-on-Android-devices) • [Cervantes](https://github.com/koreader/koreader/wiki/Installation-on-BQ-devices) • [ChromeOS](https://github.com/koreader/koreader/wiki/Installation-on-Chromebook-devices) • [Kindle](https://github.com/koreader/koreader/wiki/Installation-on-Kindle-devices) • [Kobo](https://github.com/koreader/koreader/wiki/Installation-on-Kobo-devices) • [PocketBook](https://github.com/koreader/koreader/wiki/Installation-on-PocketBook-devices) • [ReMarkable](https://github.com/koreader/koreader/wiki/Installation-on-ReMarkable) • [Desktop Linux](https://github.com/koreader/koreader/wiki/Installation-on-desktop-linux) • [MacOS](https://github.com/koreader/koreader/wiki/Installation-on-MacOS)
0xstillb pushed a commit to 0xstillb/koreader-thai that referenced this pull request May 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants