Skip to content

Commit 8c0b2f7

Browse files
committed
styles:remove visible all count
1 parent 434152c commit 8c0b2f7

File tree

2 files changed

+1
-21
lines changed

2 files changed

+1
-21
lines changed

lib/views/album_page/album_page.dart

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ class _AlbumPageState extends State<AlbumPage> implements AlbumPageContract {
2424
RefreshController(initialRefresh: false);
2525
int _perPageItemSize = 8;
2626
int _currentPage = 0;
27-
int _count = 0; //列表总数
2827

2928
_AlbumPageState() {
3029
_presenter = AlbumPagePresenter(this);
@@ -33,16 +32,14 @@ class _AlbumPageState extends State<AlbumPage> implements AlbumPageContract {
3332
@override
3433
void initState() {
3534
super.initState();
36-
_presenter.doGetItemCount();
3735
_onRefresh();
3836
}
3937

4038
@override
4139
Widget build(BuildContext context) {
4240
return Scaffold(
4341
appBar: AppBar(
44-
title: Text(
45-
'相册 - ${_uploadeds?.length ?? 0}${_count == _uploadeds.length ? '' : " - $_count"}'),
42+
title: Text('相册 - ${_uploadeds?.length ?? 0}'),
4643
centerTitle: true,
4744
),
4845
floatingActionButton: FloatingActionButton(
@@ -268,11 +265,4 @@ class _AlbumPageState extends State<AlbumPage> implements AlbumPageContract {
268265
this._uploadeds.remove(uploaded);
269266
});
270267
}
271-
272-
@override
273-
void loadItemCount(int count) {
274-
setState(() {
275-
this._count = count;
276-
});
277-
}
278268
}

lib/views/album_page/album_page_presenter.dart

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ abstract class AlbumPageContract {
88
void loadUploadedImages(List<Uploaded> uploadeds);
99
void loadError();
1010

11-
void loadItemCount(int count);
12-
1311
void deleteSuccess(Uploaded uploaded);
1412
void deleteError(String msg);
1513
}
@@ -34,14 +32,6 @@ class AlbumPagePresenter {
3432
}
3533
}
3634

37-
doGetItemCount() async {
38-
try {
39-
var sql = Sql.setTable(TABLE_NAME_UPLOADED);
40-
var result = await sql.get();
41-
_view.loadItemCount(result.length ?? 0);
42-
} catch (e) {}
43-
}
44-
4535
doDeleteImage(Uploaded uploaded) async {
4636
try {
4737
ImageUploadUtils uploader = ImageUploadUtils(

0 commit comments

Comments
 (0)