移除 A/B 相关代码。

移除 XPMomentListViewController
This commit is contained in:
QQQ
2024-05-22 19:10:34 +08:00
parent 48560b5eb6
commit 0438d882d3
4 changed files with 0 additions and 296 deletions

View File

@@ -39,7 +39,6 @@
1464C5F329A4C18000AF7C94 /* XPIAPRechargeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5F229A4C18000AF7C94 /* XPIAPRechargeViewController.m */; };
1464C5F629A4CA8C00AF7C94 /* XPIAPRechargeCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5F529A4CA8C00AF7C94 /* XPIAPRechargeCollectionViewCell.m */; };
1464C5F929A4D00000AF7C94 /* XPIAPRechargeHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1464C5F829A4D00000AF7C94 /* XPIAPRechargeHeaderView.m */; };
149839C4299E088000F82CBF /* XPMomentListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 149839C3299E088000F82CBF /* XPMomentListViewController.m */; };
149839C7299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 149839C6299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m */; };
14A6034929A3567200D2A6A5 /* XPSimpleMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A6034829A3567200D2A6A5 /* XPSimpleMineViewController.m */; };
14A6034C29A35EE600D2A6A5 /* XPMineItemTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 14A6034B29A35EE600D2A6A5 /* XPMineItemTableViewCell.m */; };
@@ -1594,8 +1593,6 @@
1464C5F529A4CA8C00AF7C94 /* XPIAPRechargeCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPIAPRechargeCollectionViewCell.m; sourceTree = "<group>"; };
1464C5F729A4D00000AF7C94 /* XPIAPRechargeHeaderView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPIAPRechargeHeaderView.h; sourceTree = "<group>"; };
1464C5F829A4D00000AF7C94 /* XPIAPRechargeHeaderView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPIAPRechargeHeaderView.m; sourceTree = "<group>"; };
149839C2299E088000F82CBF /* XPMomentListViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMomentListViewController.h; sourceTree = "<group>"; };
149839C3299E088000F82CBF /* XPMomentListViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMomentListViewController.m; sourceTree = "<group>"; };
149839C5299E0B9F00F82CBF /* XPMomentListCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMomentListCollectionViewCell.h; sourceTree = "<group>"; };
149839C6299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMomentListCollectionViewCell.m; sourceTree = "<group>"; };
14A6034729A3567200D2A6A5 /* XPSimpleMineViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPSimpleMineViewController.h; sourceTree = "<group>"; };
@@ -7562,8 +7559,6 @@
E8AB632328AE10310023B0D2 /* XPMoentsTopicListViewController.m */,
E8AB632A28AE19600023B0D2 /* XPMonentsMineViewController.h */,
E8AB632B28AE19600023B0D2 /* XPMonentsMineViewController.m */,
149839C2299E088000F82CBF /* XPMomentListViewController.h */,
149839C3299E088000F82CBF /* XPMomentListViewController.m */,
14EB640729A5BDDD00A4A00B /* XPMomentsSimpleDetailViewController.h */,
14EB640829A5BDDD00A4A00B /* XPMomentsSimpleDetailViewController.m */,
14EB640B29A5C16000A4A00B /* XPMomentsSimpleDetailNav.h */,
@@ -11664,7 +11659,6 @@
14B880E7299A4B62005FCA1B /* XPLoginPhoneViewController.m in Sources */,
E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */,
189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */,
149839C4299E088000F82CBF /* XPMomentListViewController.m in Sources */,
E8B846C226FD82DC00A777FE /* XPMineUserInfoAlbumCollectionViewCell.m in Sources */,
233423CD2AAEE98200B1253F /* XPCandyTreeConfirmBuyNumView.m in Sources */,
2331C1AD2A60F32D00E1D940 /* XPCandyTreeAnimationModel.m in Sources */,

View File

@@ -1,16 +0,0 @@
//
// YMMomentListViewController.h
// YUMI
//
// Created by XY on 2023/2/16.
//
#import "MvpViewController.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPMomentListViewController : MvpViewController
@end
NS_ASSUME_NONNULL_END

View File

@@ -1,273 +0,0 @@
//
// YMMomentListViewController.m
// YUMI
//
// Created by XY on 2023/2/16.
//
#import "XPMomentListViewController.h"
#import "YUMIMacroUitls.h"
#import <Masonry.h>
#import <MJRefresh.h>
#import "DJDKMIMOMColor.h"
#import "NSArray+Safe.h"
#import "ClientConfig.h"
#import "MonentsListInfoModel.h"
#import "XPMomentListCollectionViewCell.h"
#import "XPButton.h"
#import "XPMonentsLatestPresenter.h"
#import "XPMonentsLatestProtocol.h"
#import "XPMonentsDetailViewController.h"
#import "XPMonentsPublishViewController.h"
#import "XPMomentsSimpleDetailViewController.h"
@interface XPMomentListViewController ()<UICollectionViewDelegate, UICollectionViewDataSource, XPMonentsLatestProtocol, XPMonentsDetailViewControllerDelegate>
@property (nonatomic, strong) UICollectionView *collectionView;
///
@property (nonatomic, strong) UIView *customNav;
@property (nonatomic, strong) UILabel *titleLabel;
///
@property (nonatomic, strong) XPButton *publishBtn;
///
@property (nonatomic,strong) NSMutableArray<MonentsInfoModel *> *datasource;
///
@property (nonatomic,assign) NSInteger page;
///
@property (nonatomic,assign) BOOL hasNoMoreData;
///
@property (nonatomic,strong) MonentsListInfoModel *listInfo;
@end
@implementation XPMomentListViewController
- (BOOL)isHiddenNavBar {
return YES;
}
- (__kindof id)createPresenter {
return [[XPMonentsLatestPresenter alloc] init];
}
- (void)viewDidLoad {
[super viewDidLoad];
[self createUI];
[self initHeaderAndFooterRrfresh];
}
- (void)createUI {
[self.view addSubview:self.customNav];
[self.customNav addSubview:self.titleLabel];
[self.view addSubview:self.collectionView];
[self.view addSubview:self.publishBtn];
[self.customNav mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kStatusBarHeight);
make.leading.trailing.mas_equalTo(0);
make.height.mas_equalTo(44);
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.edges.mas_equalTo(self.customNav);
}];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.customNav.mas_bottom);
make.leading.trailing.mas_equalTo(0);
make.bottom.mas_equalTo(0);
}];
[self.publishBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.bottom.mas_equalTo(-108);
make.trailing.mas_equalTo(0);
make.width.height.mas_equalTo(70);
}];
}
///
- (void)publishBtnAction {
XPMonentsPublishViewController * publishVC = [[XPMonentsPublishViewController alloc] init];
[self.navigationController pushViewController:publishVC animated:YES];
}
#pragma mark -
- (void)initHeaderAndFooterRrfresh {
MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)];
header.stateLabel.font = [UIFont systemFontOfSize:10.0];
header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0];
header.stateLabel.textColor = [DJDKMIMOMColor secondTextColor];
header.lastUpdatedTimeLabel.textColor = [DJDKMIMOMColor secondTextColor];
self.collectionView.mj_header = header;
MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)];
footer.stateLabel.textColor = [DJDKMIMOMColor secondTextColor];
footer.stateLabel.font = [UIFont systemFontOfSize:10.0];
footer.ignoredScrollViewContentInsetBottom = self.collectionView.contentInset.bottom;
self.collectionView.mj_footer = footer;
[self headerRefresh];
}
#pragma mark - fangfa
- (void)headerRefresh {
self.page = 1;
[self.presenter getMonentsLatestListPageSize:20 dynamicId:@"" state:0];
}
- (void)footerRefresh {
if (self.hasNoMoreData) {
[self showErrorToast:YMLocalizedString(@"XPMomentListViewController0")];
[self.collectionView.mj_footer endRefreshing];
return;
}
self.page++;
[self.presenter getMonentsLatestListPageSize:20 dynamicId:self.listInfo.nextDynamicId state:1];
}
#pragma mark - XPMonentsLatestProtocol
- (void)getMonentsLatestListSuccess:(MonentsListInfoModel *)listInfo state:(int)state{
self.listInfo = listInfo;
if (state == 0) {
[self.datasource removeAllObjects];
}
if (listInfo.dynamicList.count > 0) {
[self.datasource addObjectsFromArray:listInfo.dynamicList];
}
if (state == 0) {
self.hasNoMoreData = NO;
[self.collectionView.mj_header endRefreshing];
} else {
if (listInfo.dynamicList.count > 0) {
self.hasNoMoreData = NO;
} else {
self.hasNoMoreData = YES;
}
[self.collectionView.mj_footer endRefreshing];
}
[self.collectionView reloadData];
}
- (void)getMonentsLatestListFail:(NSString *)msg state:(int)state {
if (state == 0) {
[self.collectionView.mj_header endRefreshing];
} else {
[self.collectionView.mj_footer endRefreshing];
}
}
#pragma mark - XPMonentsDetailViewControllerDelegate
- (void)xPMonentsDetailViewController:(XPMonentsDetailViewController *)view deleteMonents:(NSString *)dynamicId {
__block MonentsInfoModel * deleteInfo;
[self.datasource enumerateObjectsUsingBlock:^(MonentsInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
if (obj.dynamicId.integerValue == dynamicId.integerValue) {
deleteInfo = obj;
}
}];
if (deleteInfo) {
[self.datasource removeObject:deleteInfo];
[self.collectionView reloadData];
}
}
#pragma mark - UICollectionView
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
return self.datasource.count;
}
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
XPMomentListCollectionViewCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(XPMomentListCollectionViewCell.self) forIndexPath:indexPath];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
cell.monentsInfo = monentsInfo;
return cell;
}
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
if (self.datasource.count > 0) {
XPMomentsSimpleDetailViewController *detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}
}
#pragma mark -
- (UICollectionView *)collectionView {
if (!_collectionView) {
MSBaseRTLFlowLayout *layout = [[MSBaseRTLFlowLayout alloc] init];
layout.scrollDirection = UICollectionViewScrollDirectionVertical;
CGFloat width = (KScreenWidth - 16 -13 -16)/2.0;
CGFloat height = 220.0/165.0*width;
layout.itemSize = CGSizeMake(width, height);
layout.minimumLineSpacing = 12.0;
layout.minimumInteritemSpacing = 13.0;
layout.sectionInset = UIEdgeInsetsMake(12, 16, 12, 16);
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
_collectionView.backgroundColor = UIColor.clearColor;
_collectionView.alwaysBounceVertical = YES;
[_collectionView registerClass:[XPMomentListCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass(XPMomentListCollectionViewCell.self)];
_collectionView.delegate = self;
_collectionView.dataSource = self;
_collectionView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
}
return _collectionView;
}
- (XPButton *)publishBtn {
if (!_publishBtn) {
_publishBtn = [XPButton buttonWithType:UIButtonTypeCustom];
_publishBtn.backgroundColor = UIColorFromRGB(0x0C1430);
[_publishBtn setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
_publishBtn.titleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
[_publishBtn setTitle:YMLocalizedString(@"XPMomentListViewController1") forState:UIControlStateNormal];
[_publishBtn setImage:[UIImage imageNamed:@"moment_camera"] forState:UIControlStateNormal];
[_publishBtn addTarget:self action:@selector(publishBtnAction) forControlEvents:UIControlEventTouchUpInside];
_publishBtn.layer.cornerRadius = 70/2;
_publishBtn.clipsToBounds = YES;
_publishBtn.buttonStyle = XPButtonImageTop;
_publishBtn.padding = 4;
}
return _publishBtn;
}
- (UIView *)customNav {
if (!_customNav) {
_customNav = [[UIView alloc] init];
_customNav.backgroundColor = [DJDKMIMOMColor appBackgroundColor];
}
return _customNav;
}
- (UILabel *)titleLabel {
if (!_titleLabel) {
_titleLabel = [[UILabel alloc] init];
_titleLabel.text = YMLocalizedString(@"XPMomentListViewController2");
_titleLabel.backgroundColor = [UIColor clearColor];
_titleLabel.font = [UIFont systemFontOfSize:18.f weight:UIFontWeightMedium];
_titleLabel.textColor = DJDKMIMOMColor.mainTextColor;
_titleLabel.textAlignment = NSTextAlignmentCenter;
}
return _titleLabel;
}
- (NSMutableArray<MonentsInfoModel *> *)datasource {
if (!_datasource) {
_datasource = [NSMutableArray array];
}
return _datasource;
}
@end

View File

@@ -71,7 +71,6 @@
#import "XPReceiveRedPacketView.h"
#import "XPRoomYearActivityView.h"
#import "XPUpgradeView.h"
#import "XPMomentListViewController.h"
#import "XPSimpleMineViewController.h"
#import "XPLoginAuthCodeVC.h"
///Present