feat: 添加 EPMomentAPIHelper_Deprecated 以支持旧版 API
主要变更: 1. 新增 EPMomentAPIHelper_Deprecated.h 和 EPMomentAPIHelper_Deprecated.m 文件,提供与旧版 Objective-C API 的兼容性。 2. 该文件已被 EPMomentAPISwiftHelper.swift 替代,保留仅供参考,后续可删除。 3. 更新 EPMomentListView 以使用新的 Swift 版本 API,提升代码的现代化和类型安全。 此更新旨在确保旧版 API 的平滑过渡,同时鼓励使用新的 Swift 实现。
This commit is contained in:
42
YuMi/E-P/NewMoments/Services/EPMomentAPIHelper_Deprecated.h
Normal file
42
YuMi/E-P/NewMoments/Services/EPMomentAPIHelper_Deprecated.h
Normal file
@@ -0,0 +1,42 @@
|
||||
//
|
||||
// EPMomentAPIHelper_Deprecated.h
|
||||
// YuMi
|
||||
//
|
||||
// Created by AI on 2025-10-10.
|
||||
//
|
||||
// ⚠️ DEPRECATED: 已被 EPMomentAPISwiftHelper.swift 替代
|
||||
// 原因:
|
||||
// 1. 继承 BaseMvpPresenter 会引起 Bridging Header 依赖链问题
|
||||
// 2. Swift 版本更简洁、类型安全
|
||||
// 3. 功能已完整迁移到 Swift 版本
|
||||
//
|
||||
// 保留此文件仅供参考,后续可删除
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "BaseMvpPresenter.h"
|
||||
#import "MomentsInfoModel.h"
|
||||
#import "MomentsListInfoModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 推荐/我的动态列表数据源类型
|
||||
typedef NS_ENUM(NSInteger, EPMomentListSourceType) {
|
||||
EPMomentListSourceTypeRecommend = 0,
|
||||
EPMomentListSourceTypeMine = 1
|
||||
};
|
||||
|
||||
/// 统一封装 Moments 列表 API
|
||||
@interface EPMomentAPIHelper : BaseMvpPresenter
|
||||
|
||||
/// 拉取最新动态列表(默认 types:"0,2" 图片+文字)
|
||||
- (void)fetchLatestMomentsWithNextID:(NSString *)nextID
|
||||
completion:(void (^)(NSArray <MomentsInfoModel *>* _Nullable list, NSString *nextMomentID))completion
|
||||
failure:(void(^)(NSInteger code, NSString * _Nullable msg))failure;
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
|
Reference in New Issue
Block a user