mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-02-24 18:38:48 +01:00
Fix number of photos is visible before finished loading
This commit is contained in:
parent
2f4c6ba68e
commit
5358a53f4f
1 changed files with 6 additions and 5 deletions
|
@ -140,7 +140,7 @@ class _PersonBrowserState extends State<PersonBrowser>
|
||||||
),
|
),
|
||||||
child: CustomScrollView(
|
child: CustomScrollView(
|
||||||
slivers: [
|
slivers: [
|
||||||
_buildAppBar(context),
|
_buildAppBar(context, state),
|
||||||
if (state is ListFaceFileBlocLoading ||
|
if (state is ListFaceFileBlocLoading ||
|
||||||
_buildItemQueue.isProcessing)
|
_buildItemQueue.isProcessing)
|
||||||
const SliverToBoxAdapter(
|
const SliverToBoxAdapter(
|
||||||
|
@ -158,15 +158,15 @@ class _PersonBrowserState extends State<PersonBrowser>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildAppBar(BuildContext context) {
|
Widget _buildAppBar(BuildContext context, ListFaceFileBlocState state) {
|
||||||
if (isSelectionMode) {
|
if (isSelectionMode) {
|
||||||
return _buildSelectionAppBar(context);
|
return _buildSelectionAppBar(context);
|
||||||
} else {
|
} else {
|
||||||
return _buildNormalAppBar(context);
|
return _buildNormalAppBar(context, state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget _buildNormalAppBar(BuildContext context) {
|
Widget _buildNormalAppBar(BuildContext context, ListFaceFileBlocState state) {
|
||||||
return SliverAppBar(
|
return SliverAppBar(
|
||||||
floating: true,
|
floating: true,
|
||||||
titleSpacing: 0,
|
titleSpacing: 0,
|
||||||
|
@ -192,7 +192,8 @@ class _PersonBrowserState extends State<PersonBrowser>
|
||||||
softWrap: false,
|
softWrap: false,
|
||||||
overflow: TextOverflow.clip,
|
overflow: TextOverflow.clip,
|
||||||
),
|
),
|
||||||
if (_backingFiles != null)
|
if (state is! ListFaceFileBlocLoading &&
|
||||||
|
!_buildItemQueue.isProcessing)
|
||||||
Text(
|
Text(
|
||||||
L10n.global()
|
L10n.global()
|
||||||
.personPhotoCountText(itemStreamListItems.length),
|
.personPhotoCountText(itemStreamListItems.length),
|
||||||
|
|
Loading…
Reference in a new issue