Skip to content
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

Remove unused code #3

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions EulixSpace/Business/Me/ESMeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,7 @@
#import "ESDIDDocManager.h"

typedef NS_ENUM(NSUInteger, ESSettingCellType) {
ESSettingCellTypeDevice,
ESSettingCellTypeMember, //家庭

ESSettingCellTypeRecycleBin, //回收站
ESSettingCellTypeMeShare, //我的分享
ESSettingCellTypeCache, //清除缓存
ESSettingCellTypeTrialFeedback, //试用反馈
ESSettingCellTypeFAQ, //帮助与反馈
ESSettingCellTypeLogin, //登陆终端

ESSettingCellTypeWeb, //访问网页端
ESSettingCellTypeNews, //消息设置
ESSettingCellTypeAbout, //关于
ESSettingCellTypeSetting, //设置
ESSettingCellTypeContactEmail, // Contact Email
Expand Down Expand Up @@ -396,93 +385,17 @@ - (void)deviceManager {
[self.navigationController pushViewController:vc animated:YES];
}

- (void)clearCache {
[ESCacheCleanTools clearAllCache];
[ESToast toastSuccess:TEXT_ME_ALREADY_CLEARED_CACHE];
self.cacheSize = @"0.00B";
[ESCacheCleanTools cacheSizeWithCompletion:^(NSString *size) {
self.cacheSize = size;
}];
}

- (void)about {
ESAboutViewController *next = [ESAboutViewController new];
[self.navigationController pushViewController:next animated:YES];
}

- (void)onSetting:(ESFormItem *)item action:(ESFormViewAction)action {
switch (item.row) {
//
case ESSettingCellTypeDevice:
[self deviceManager];
break;
case ESSettingCellTypeRecycleBin: {
ESRecycleBinVC *vc = [[ESRecycleBinVC alloc] init];
[self.navigationController pushViewController:vc animated:YES];
} break;

case ESSettingCellTypeLogin: {
ESLoginTerminalVC *vc = [[ESLoginTerminalVC alloc] init];
[self.navigationController pushViewController:vc animated:YES];
} break;

case ESSettingCellTypeCache: {
//清除缓存 mine.click.clearCache
NSString *title = [NSString stringWithFormat:TEXT_ME_CONFIRM_THE_DELETION_TITLE, self.cacheSize];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:nil
message:title
preferredStyle:UIAlertControllerStyleActionSheet];
UIAlertAction *confirm = [UIAlertAction actionWithTitle:TEXT_CONFIRM_THE_DELETION
style:UIAlertActionStyleDestructive
handler:^(UIAlertAction *_Nonnull action) {
[self clearCache];
}];
UIAlertAction *cancel = [UIAlertAction actionWithTitle:TEXT_CANCEL
style:UIAlertActionStyleCancel
handler:^(UIAlertAction *_Nonnull action){

}];

[alert addAction:confirm];
[alert addAction:cancel];
[self presentViewController:alert animated:YES completion:nil];

} break;
case ESSettingCellTypeContactEmail: {
[self sendMail];
break;
}

case ESSettingCellTypeTrialFeedback: {
__weak typeof(self) weakSelf = self;
ESDeviceInfoModel *deviceInfo = [[ESCache defaultCache] objectForKey:ESBoxManager.activeBox.boxUUID];
if(deviceInfo.systemInfo.spaceVersion){
NSInteger isWebFeedback = [ESCommonToolManager compareVersion:FeedbackVersionH5 withVersion:deviceInfo.systemInfo.spaceVersion];
if(isWebFeedback == 1){
ESFeedbackViewController *vc = [ESFeedbackViewController new];
[self.navigationController pushViewController:vc animated:YES];
}else{

[[ESCommonToolManager manager] toWebFeedbackWithImage:nil];
}
}else{
[ESDeviceInfoServiceModule getDeviceInfoWithCompletion:^(ESDeviceInfoResultModel * _Nullable deviceInfoResult, NSError * _Nullable error) {
__strong typeof(weakSelf) self = weakSelf;
if (!error && deviceInfoResult) {
NSInteger isWebFeedback = [ESCommonToolManager compareVersion:FeedbackVersionH5 withVersion:deviceInfoResult.spaceVersion];
if(isWebFeedback == 1){
ESFeedbackViewController *vc = [ESFeedbackViewController new];
[self.navigationController pushViewController:vc animated:YES];
}else{
[[ESCommonToolManager manager] toWebFeedbackWithImage:nil];
}
}else{
[ESToast toastWarning:NSLocalizedString(@"service failed, retry later", @"服务异常,请稍后重试")];
}
}];
}
}
break;
case ESSettingCellTypeFAQ: {
//查看帮助内容 mine.click.viewHelp
///帮助与反馈
Expand Down Expand Up @@ -511,19 +424,6 @@ - (void)onSetting:(ESFormItem *)item action:(ESFormViewAction)action {
}];
[self.navigationController pushViewController:next animated:YES];
} break;

case ESSettingCellTypeWeb: {
if (action == ESFormViewActionArrow) {
//复制web端链接 mine.click.copyLink
UIPasteboard.generalPasteboard.string = item.content;
[ESToast toastInfo:TEXT_ME_WEB_COPY];
}
} break;
case ESSettingCellTypeNews: {
ESPushNewsSettingVC *pushVC = [ESPushNewsSettingVC new];
[self.navigationController pushViewController:pushVC animated:YES];
} break;

case ESSettingCellTypeAbout:
[self about];
break;
Expand Down