File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -161,7 +161,7 @@ - (void)rightNavBtnClicked{
161161 [actionTitles removeObjectAtIndex: 0 ];
162162 }
163163 __weak typeof (self) weakSelf = self;
164- [[UIActionSheet bk_actionSheetCustomWithTitle: nil buttonTitles: actionTitles destructiveTitle: @" 删除文件" cancelTitle: @" 取消" andDidDismissBlock: ^(UIActionSheet *sheet, NSInteger index) {
164+ [[UIActionSheet bk_actionSheetCustomWithTitle: nil buttonTitles: actionTitles destructiveTitle: self .myCodeFile.can_edit? @" 删除文件" : nil cancelTitle: @" 取消" andDidDismissBlock: ^(UIActionSheet *sheet, NSInteger index) {
165165 [weakSelf actionSheetClicked: sheet index: index];
166166 }] showInView: self .view];
167167}
@@ -176,7 +176,7 @@ - (void)actionSheetClicked:(UIActionSheet *)sheet index:(NSInteger)index{
176176 [self goToCommitsVC ];
177177 }else if (index == 2 ){
178178 [self popOut ];
179- }else if (index == 3 ){
179+ }else if (index == 3 && self. myCodeFile . can_edit ){
180180 [self deleteBtnClicked ];
181181 }
182182}
You can’t perform that action at this time.
0 commit comments