-
Notifications
You must be signed in to change notification settings - Fork 156
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
Add share dialog with clipboard #277
Conversation
9ce8923
to
c1373a2
Compare
感谢贡献,我在mac下测试剪贴板功能正常~
|
番剧分享好像信息不太全,比如缺少图片链接 |
应用下面的补丁之后,this->episodeResult.cover 是单独一集的封面,this->seasonInfo.cover 是整个番剧的封面。(可以在单集封面不存在的情况下使用番剧封面) diff --git a/wiliwili/include/api/bilibili/result/home_pgc_season_result.h b/wiliwili/include/api/bilibili/result/home_pgc_season_result.h
index 96eed9f..3b5753e 100644
--- a/wiliwili/include/api/bilibili/result/home_pgc_season_result.h
+++ b/wiliwili/include/api/bilibili/result/home_pgc_season_result.h
@@ -47,6 +47,7 @@ public:
std::string long_title;
std::string subtitle;
std::string link;
+ std::string cover;
unsigned int pub_time;
EpisodesBadge badge_info;
@@ -66,7 +67,9 @@ inline void from_json(const nlohmann::json& nlohmann_json_j, SeasonEpisodeResult
if (nlohmann_json_j.contains("subtitle")) {
nlohmann_json_j.at("subtitle").get_to(nlohmann_json_t.subtitle);
}
-
+ if (nlohmann_json_j.contains("cover")) {
+ nlohmann_json_j.at("cover").get_to(nlohmann_json_t.cover);
+ }
if (nlohmann_json_j.contains("badge_info")) {
nlohmann_json_j.at("badge_info").get_to(nlohmann_json_t.badge_info);
}
@@ -206,6 +209,7 @@ inline void from_json(const nlohmann::json& nlohmann_json_j, SeasonRecommendWrap
class SeasonResultWrapper {
public:
unsigned int season_id;
+ std::string cover;
std::string season_title;
std::string season_desc;
SeasonEpisodeListResult episodes;
@@ -257,6 +261,9 @@ inline void from_json(const nlohmann::json& nlohmann_json_j, SeasonResultWrapper
if (nlohmann_json_j.contains("user_status")) {
nlohmann_json_j.at("user_status").get_to(nlohmann_json_t.user_status);
}
+ if (nlohmann_json_j.contains("cover")) {
+ nlohmann_json_j.at("cover").get_to(nlohmann_json_t.cover);
+ }
NLOHMANN_JSON_EXPAND(NLOHMANN_JSON_PASTE(NLOHMANN_JSON_FROM, season_id, season_title, evaluate));
}
|
已更新番剧分享的逻辑 |
感谢,我刚刚切换到浅色主题又测试了一下,发现分割线和右上角的关闭按键用的颜色在浅色下显示效果不佳。 对于关闭按钮,好像是不指定 textColor 就会自动根据主题更换颜色。对于分割线,可以使用 @theme/color/line |
同时如果方便的话最好可以手动指定一下分享按钮焦点切换的逻辑,(在 xml 里使用 focusDown 和 focusUp) |
@happytommyl
解決 #201
看到 #205 好久沒有更新 这里补完一下代码