Skip to content
This repository was archived by the owner on Oct 30, 2025. It is now read-only.

时间线中的手动置顶#46

Draft
Yixuan-Wang wants to merge 6 commits into
devfrom
feat-pin
Draft

时间线中的手动置顶#46
Yixuan-Wang wants to merge 6 commits into
devfrom
feat-pin

Conversation

@Yixuan-Wang

Copy link
Copy Markdown
Collaborator

可以在边栏中设置、取消,也可以在设置中调整。

image
image

@Yixuan-Wang Yixuan-Wang requested a review from AllanChain August 25, 2020 14:25
@Yixuan-Wang

Copy link
Copy Markdown
Collaborator Author

目前的错误处理方式是弹窗警告,似乎还需要改善。

Comment thread src/Flows.js Outdated
Comment thread src/Flows.js Outdated

@AllanChain AllanChain left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

错误处理这玩意让

.catch(failed);

处理就差不多了吧。经过测试期没什么问题的话,一般情况下也不会有什么大 bug,出现错误基本是没网。

@Yixuan-Wang

Yixuan-Wang commented Aug 26, 2020

Copy link
Copy Markdown
Collaborator Author

错误处理这玩意让

.catch(failed);

处理就差不多了吧

好像不行,那样时间线就加载不出来了,整条 Promise 链都 reject 了……
主要有影响的错误是 没有这条树洞,这种情况很可能发生(置顶了一个洞,之后它被:crab:了)。在 API 中用同步的 catch 可以保证其他的置顶以及时间线的正常显示。现在的解决方案是给 get_multiple API 加了一个错误处理函数的参数,对于置顶来说,如果出现“没有这条树洞”就把这个洞从置顶列表里去掉。

Yixuan-Wang and others added 2 commits August 26, 2020 09:07
- check error message before removing pinned
- refactored title to Flow
@AllanChain

AllanChain commented Sep 10, 2020

Copy link
Copy Markdown
Owner

如果出现“没有这条树洞”就把这个洞从置顶列表里去掉

所以应该判断错误信息。可能的情况是网不好,加载第一页的时候成功了,但是加载置顶洞的时候断网了,那么置顶洞会丢失。可以通过调成 slow 3G, 再调成 offline 复现。丢数据的事情应该尽量避免发生。

以及边循环边删会导致混乱(漏循环)

@AllanChain AllanChain added this to the v0.6.0 milestone Sep 10, 2020
@AllanChain AllanChain added the enhancement New feature or request label Sep 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants