Skip to content

Commit

Permalink
Allow CollectionList to hide footer
Browse files Browse the repository at this point in the history
  • Loading branch information
xfangfang committed Jul 30, 2023
1 parent 11a08aa commit d211c12
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
[![Scoop Version (extras bucket)](https://img.shields.io/scoop/v/wiliwili?bucket=extras)](https://scoop.sh/#/apps?q=wiliwili)
[![aur](https://img.shields.io/aur/version/wiliwili-git?color=blue&logo=archlinux)](https://aur.archlinux.org/packages/wiliwili-git/)
[![nightly.link](https://img.shields.io/badge/nightly.link-%E6%B5%8B%E8%AF%95%E7%89%88-green)](https://nightly.link/xfangfang/wiliwili/workflows/build.yaml/dev)
[![layout](https://img.shields.io/badge/wiliwili-自定义布局-yellow)](https://github.com/xfangfang/wiliwili_theme)
[![QQ](https://img.shields.io/badge/QQ频道-wiliwili-red)](https://pd.qq.com/s/1gqqxfogy)

<br>
Expand Down
1 change: 1 addition & 0 deletions resources/xml/fragment/mine_collection_video_list.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
width="auto"
height="auto">
<brls:AppletFrame
id="collection/appletFrame"
iconInterpolation="linear"
headerHidden="true"
footerHidden="false"
Expand Down
1 change: 1 addition & 0 deletions wiliwili/include/fragment/mine_collection_video_list.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class MineCollectionVideoList : public brls::Box {
BRLS_BIND(brls::Label, labelSubtitle, "collection/label/subtitle");
BRLS_BIND(brls::Image, imageCover, "collection/cover");
BRLS_BIND(RecyclingGrid, recyclingGrid, "collection/recyclingGrid");
BRLS_BIND(brls::AppletFrame, appletFrame, "collection/appletFrame");

unsigned int requestIndex = 1;
int requestType = 1;
Expand Down
4 changes: 4 additions & 0 deletions wiliwili/source/fragment/mine_collection_video_list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ MineCollectionVideoList::MineCollectionVideoList() {
this->collectionData.id = std::stoll(value);
this->requestCollectionList();
});
registerBoolXMLAttribute("footerHidden", [this](bool value) {
this->appletFrame->setFooterVisibility(
value ? brls::Visibility::GONE : brls::Visibility::VISIBLE);
});

// 初始化列表
recyclingGrid->registerCell(
Expand Down
4 changes: 4 additions & 0 deletions wiliwili/source/utils/config_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,11 @@ void ProgramConfig::loadCustomThemes() {

for (const auto& entry :
fs::directory_iterator(getConfigDir() + "/theme")) {
#if USE_BOOST_FILESYSTEM
if (!fs::is_directory(entry)) continue;
#else
if (!entry.is_directory()) continue;
#endif
std::string subDirectory = entry.path().string();
std::string jsonFilePath = subDirectory + "/resources_meta.json";
if (!fs::exists(jsonFilePath)) continue;
Expand Down

0 comments on commit d211c12

Please sign in to comment.