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(
|
||||
slivers: [
|
||||
_buildAppBar(context),
|
||||
_buildAppBar(context, state),
|
||||
if (state is ListFaceFileBlocLoading ||
|
||||
_buildItemQueue.isProcessing)
|
||||
const SliverToBoxAdapter(
|
||||
|
@ -158,15 +158,15 @@ class _PersonBrowserState extends State<PersonBrowser>
|
|||
);
|
||||
}
|
||||
|
||||
Widget _buildAppBar(BuildContext context) {
|
||||
Widget _buildAppBar(BuildContext context, ListFaceFileBlocState state) {
|
||||
if (isSelectionMode) {
|
||||
return _buildSelectionAppBar(context);
|
||||
} else {
|
||||
return _buildNormalAppBar(context);
|
||||
return _buildNormalAppBar(context, state);
|
||||
}
|
||||
}
|
||||
|
||||
Widget _buildNormalAppBar(BuildContext context) {
|
||||
Widget _buildNormalAppBar(BuildContext context, ListFaceFileBlocState state) {
|
||||
return SliverAppBar(
|
||||
floating: true,
|
||||
titleSpacing: 0,
|
||||
|
@ -192,7 +192,8 @@ class _PersonBrowserState extends State<PersonBrowser>
|
|||
softWrap: false,
|
||||
overflow: TextOverflow.clip,
|
||||
),
|
||||
if (_backingFiles != null)
|
||||
if (state is! ListFaceFileBlocLoading &&
|
||||
!_buildItemQueue.isProcessing)
|
||||
Text(
|
||||
L10n.global()
|
||||
.personPhotoCountText(itemStreamListItems.length),
|
||||
|
|
Loading…
Reference in a new issue