Skip to content

Commit 770b5bb

Browse files
committed
feature:add delete status
1 parent f7c0654 commit 770b5bb

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

lib/views/manage_page/gitee_page/gitee_repo_page.dart

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,20 @@ class _GiteeRepoPageState extends BaseLoadingPageState<GiteeRepoPage>
160160
content: Text('删除后无法恢复'),
161161
actions: <Widget>[
162162
FlatButton(
163-
child: Text('确定'),
164-
onPressed: () {
165-
_presenter.doDeleteContents(_path, _prePath,
166-
contents[index].name, contents[index].sha);
167-
Navigator.pop(context, true);
168-
},
169-
),
163+
child: Text('确定'),
164+
onPressed: () {
165+
Navigator.pop(context, true);
166+
}),
170167
],
171168
);
172169
});
173-
return result;
170+
if (!(result ?? false)) {
171+
return false;
172+
}
173+
174+
var del = await _presenter.doDeleteContents(
175+
_path, _prePath, contents[index].name, contents[index].sha);
176+
return del;
174177
},
175178
);
176179
});

0 commit comments

Comments
 (0)