| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1e43a87 commit e2dcce6
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -161,7 +161,7 @@ - (void)rightNavBtnClicked{ | |||
| 161 | 161 | [actionTitles removeObjectAtIndex:0]; | |
| 162 | 162 | } | |
| 163 | 163 | __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) { | ||
| 165 | 165 | [weakSelf actionSheetClicked:sheet index:index]; | |
| 166 | 166 | }] showInView:self.view]; | |
| 167 | 167 | } | |
@@ -176,7 +176,7 @@ - (void)actionSheetClicked:(UIActionSheet *)sheet index:(NSInteger)index{ | |||
| 176 | 176 | [self goToCommitsVC]; | |
| 177 | 177 | }else if (index == 2){ | |
| 178 | 178 | [self popOut]; | |
| 179 | - }else if (index == 3){ | ||
| 179 | + }else if (index == 3 && self.myCodeFile.can_edit){ | ||
| 180 | 180 | [self deleteBtnClicked]; | |
| 181 | 181 | } | |
| 182 | 182 | } | |
| Back | FazBrowse Home | New Git URL |
0 commit comments