修改我的皮肤逻辑

This commit is contained in:
2025-12-22 16:42:56 +08:00
parent 9e33c93763
commit 5cfc76e6c5
4 changed files with 80 additions and 5 deletions

View File

@@ -76,7 +76,7 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
[self.collectionView kb_endLoadingForEmpty];
// +
self.collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(fetchDownloadedThemes)];
self.collectionView.mj_header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(fetchPurchasedThemes)];
//
[self.collectionView.mj_header beginRefreshing];
@@ -85,9 +85,9 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
self.bottomView.hidden = YES;
}
- (void)fetchDownloadedThemes {
- (void)fetchPurchasedThemes {
KBWeakSelf
[self.viewModel fetchDownloadedThemesWithCompletion:^(NSArray<KBMyTheme *> * _Nullable themes, NSError * _Nullable error) {
[self.viewModel fetchPurchasedThemesWithCompletion:^(NSArray<KBMyTheme *> * _Nullable themes, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
if ([weakSelf.collectionView.mj_header isRefreshing]) {
[weakSelf.collectionView.mj_header endRefreshing];
@@ -177,8 +177,8 @@ static NSString * const kMySkinCellId = @"kMySkinCellId";
[KBHUD show];
KBWeakSelf
[self.viewModel deleteDownloadedThemesWithIds:themeIds
completion:^(BOOL success, NSError * _Nullable error) {
[self.viewModel deletePurchasedThemesWithIds:themeIds
completion:^(BOOL success, NSError * _Nullable error) {
dispatch_async(dispatch_get_main_queue(), ^{
[KBHUD dismiss];
if (!success) {