feat(reader): M27 书架按目录分组(ui.shelf_group=folder|format,默认 format 不变)
- 新增 shelf_model.c/.h:扫描/行序列从 shelf.c 拆出(纯 C,宿主可测);shelf_book 加 group[96](相对 Books/ 的目录路径,根下空串),path 语义/内容完全不变(进度键仍为 rdprog_hash(path)) - folder 模式:目录段头(根下=未分类),未分类置顶、其余按目录名排序;组内沿用最近阅读优先/其次书名;空目录不产生段头 - format 模式逐行保持旧行为;新增 reader.conf ui.shelf_group,缺键默认 format - 上限 256→2048(SHELF_MAX_ROWS=2N=4096,段头≤书数),超限置可读提示,不再静默截断 - 顶栏加「目录/格式」切换,设置页加「书架分组」;UTF-8 安全截断长中文目录名 - 单测 test/shelf_group_smoke.c(38 断言)+ 计时 test/shelf_scan_bench.c - build_reader.sh:链 meow_ui.a 解析冒烟 stbi_*;无 qemu 时跳过执行而非失败
This commit is contained in:
1 parent
db672cbe8f
commit
409fd1edf7
11 files changed
+800
-129
No files matched your search
@@ -20,6 +20,7 @@ int shelf_on_tap(int x, int y);
|
||||
void shelf_on_swipe(int dir, int dx, int dy);
|
||||
void shelf_redraw(void);
|
||||
void shelf_set_view(int grid); /* 1=grid 0=list;读 reader.conf ui.shelf_layout(A) */
|
||||
void shelf_set_group(int folder); /* 1=folder 0=format;写 ui.shelf_group(M27) */
|
||||
|
||||
/* ---- 阅读页(app/reader.c)---- */
|
||||
meow_view *reader_view_create(void);
|
||||
|
||||
Reference in new issue
Block a user