Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed May 1, 2023
1 parent 717b0a5 commit 7180066
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 27 deletions.
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,19 +100,21 @@ wiliwili 拥有丰富的自定义选项,包括:使用 Anime4K 提升观感
- [x] 增加设置使首页无法通过返回退出,避免误触
- [x] 使用教程添加未指明的快捷键说明
- [x] 重压摇杆临时快进
- [ ] 搜索支持搜索用户
- [x] 支持切换按键图标
- [x] 应用内多语言切换
- [x] 重构搜索页面
- [x] 评论@显示不同颜色
- [x] 完善评论图片
- [x] 评论大表情包所在行增加行高
- [x] 支持webp图片
- [ ] 搜索支持搜索用户
- [ ] 长按一键三连
- [ ] 重构搜索页面
- [ ] 支持个人主页
- [ ] 评论跳转进度
- [ ] 评论跳转搜索
- [ ] 评论@显示不同颜色
- [ ] 完善评论图片
- [ ] 评论大表情包所在行增加行高
- [ ] 评论更多信息 (置顶/按时间/up主点赞)
- [x] 支持webp图片
- [ ] 评论下方的更多信息 (up主点赞等内容)
- [ ] 投票评论
- [ ] 互动视频

</details>

Expand Down
2 changes: 0 additions & 2 deletions wiliwili/include/presenter/video_detail.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ enum class PGC_ID_TYPE {

class VideoDetail : public Presenter {
public:
VideoDetail();

virtual void onVideoInfo(const bilibili::VideoDetailResult& result) {}
virtual void onSeasonVideoInfo(
const bilibili::SeasonResultWrapper& result) {}
Expand Down
35 changes: 21 additions & 14 deletions wiliwili/source/activity/player_season_activity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ PlayerSeasonActivity::PlayerSeasonActivity(const unsigned int id,
brls::Logger::debug("open ep: {}", id);
}

this->changeEpisodeEvent.subscribe([this](auto t) {
if (t.id == 0) return;

// 设置评论区骨架屏幕
this->recyclingGrid->estimatedRowHeight = 100;
this->recyclingGrid->showSkeleton();

auto view = brls::Application::getCurrentFocus();
if (view->getParentActivity() == this &&
(dynamic_cast<VideoComment*>(view) != nullptr ||
dynamic_cast<VideoCommentReply*>(view) != nullptr)) {
// 焦点位于当前页面,且在 评论 或 回复 上时,将焦点转移到tab栏
tabFrame->focusTab(0);
}

// 因为是手动切换分集,所以将分集进度设置为 0
t.progress = 0;
this->changeEpisode(t);
});

this->setProgress(progress);
}

Expand Down Expand Up @@ -54,21 +74,8 @@ void PlayerSeasonActivity::onIndexChange(size_t index) {
// 也就是说目前的设定是自动连播不会跨越section播放
if (episodeList[index].id == 0) return;

// 设置评论区骨架屏幕
this->recyclingGrid->estimatedRowHeight = 100;
this->recyclingGrid->showSkeleton();
// 当焦点在评论区时,将焦点转移到tab栏
auto view = brls::Application::getCurrentFocus();
// 焦点位于当前页面,且在 评论 或 回复 上
if (view->getParentActivity() == this &&
(dynamic_cast<VideoComment*>(view) != nullptr ||
dynamic_cast<VideoCommentReply*>(view) != nullptr)) {
tabFrame->focusTab(0);
}
this->changeEpisodeEvent.fire(episodeList[index]);

// 因为是手动切换分集,所以将分集进度设置为 0
episodeList[index].progress = 0;
this->changeEpisode(episodeList[index]);
this->changeIndexEvent.fire(index);
}

Expand Down
4 changes: 0 additions & 4 deletions wiliwili/source/presenter/video_detail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@
#include "view/video_view.hpp"
#include "bilibili/result/mine_collection_result.h"

VideoDetail::VideoDetail() {
changeEpisodeEvent.subscribe([this](auto t) { changeEpisode(t); });
}

/// 请求视频数据
void VideoDetail::requestData(const bilibili::VideoDetailResult& video) {
this->requestVideoInfo(video.bvid);
Expand Down

0 comments on commit 7180066

Please sign in to comment.