Skip to content

Commit 1d20c5f

Browse files
committed
fix #71
1 parent baf85ce commit 1d20c5f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

lib/page/RepositoryFileListPage.dart

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import 'dart:async';
22

33
import 'package:flutter/material.dart';
4+
import 'package:fluttertoast/fluttertoast.dart';
45
import 'package:gsy_github_app_flutter/common/dao/ReposDao.dart';
56
import 'package:gsy_github_app_flutter/common/model/FileModel.dart';
67
import 'package:gsy_github_app_flutter/common/style/GSYStyle.dart';
@@ -91,6 +92,10 @@ class RepositoryDetailFileListPageState extends GSYListState<RepositoryDetailFil
9192

9293
///头部列表点击
9394
_resolveHeaderClick(index) {
95+
if(isLoading) {
96+
Fluttertoast.showToast(msg: CommonUtils.getLocale(context).loading_text);
97+
return;
98+
}
9499
if (headerList[index] != ".") {
95100
List<String> newHeaderList = headerList.sublist(0, index + 1);
96101
String path = newHeaderList.sublist(1, newHeaderList.length).join("/");
@@ -111,6 +116,10 @@ class RepositoryDetailFileListPageState extends GSYListState<RepositoryDetailFil
111116
///item文件列表点击
112117
_resolveItemClick(FileItemViewModel fileItemViewModel) {
113118
if (fileItemViewModel.type == "dir") {
119+
if(isLoading) {
120+
Fluttertoast.showToast(msg: CommonUtils.getLocale(context).loading_text);
121+
return;
122+
}
114123
this.setState(() {
115124
headerList.add(fileItemViewModel.name);
116125
});

0 commit comments

Comments
 (0)