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

离线使用反馈 #50

Closed
Jacheers opened this issue Oct 26, 2021 · 8 comments
Closed

离线使用反馈 #50

Jacheers opened this issue Oct 26, 2021 · 8 comments

Comments

@Jacheers
Copy link

Jacheers commented Oct 26, 2021

既然看过的本子会缓存在本地,那离线打开pikapi的浏览记录时,应该可以看已缓存的本子才对,而不是傻傻地提示用户下拉刷新。
顺带一提,已缓存的本子在下载时可以直接从remote文件夹提取图片,就不必再下载一次。

@Jacheers
Copy link
Author

还有一点小失误,在删除浏览记录时,对应的缓存也应该被立即删除。

@niuhuan
Copy link
Owner

niuhuan commented Oct 27, 2021

  1. 造成这个结果的原因是因为图片缓存了1月,漫画只缓存了两个小时,因为漫画有可能被更新。
  2. 下载的时候如果有缓存会直接从remote提取,详见image.go
  3. 不会从Download复制回remote(原来有这个逻辑后来删除掉了)

@Jacheers
Copy link
Author

多加个控制选项吧。感觉明知有缓存,前端却又无法显示,就挺难受的。

@niuhuan
Copy link
Owner

niuhuan commented Oct 27, 2021

我之前有计划网络不通时缓存的读取,一般看过一遍就不看了,离线模式只从缓存读取会比较适合你的需求?

@Jacheers Jacheers reopened this Oct 31, 2021
@Jacheers
Copy link
Author

抱歉迟了,需求确实是像你说的那样。

@Z-fly
Copy link

Z-fly commented Oct 31, 2021

多加个控制选项吧。感觉明知有缓存,前端却又无法显示,就挺难受的。

有必要加个控制开关吗,离线模式上不了网的话,只能读缓存

@Jacheers
Copy link
Author

就是因为读不了缓存啊。明明图片可以缓存一个月,但漫画信息2个小时就没了,导致2个小时以后的漫画都加载不出来。

@niuhuan
Copy link
Owner

niuhuan commented Oct 31, 2021

如果没有网, 可能会卡在登录页面, 也有可能已经进入了app才离线的。

入口放在哪里, 怎么退出还是要考虑, 这个场景用的比较少, 最好不影响其他用户体验。

(反复要看的内容为什么不用下载呢, 我会先做多线程/多携程下载的功能)。

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

No branches or pull requests

3 participants