mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-22 16:56:19 +01:00
Hide scrollbar before queried all items
This commit is contained in:
parent
3e617ac59e
commit
bc9227d2ad
3 changed files with 8 additions and 3 deletions
|
@ -165,6 +165,7 @@ class _HomePhotosState extends State<HomePhotos>
|
|||
bottomOffset: _calcBottomAppBarExtent(context),
|
||||
labelTextBuilder: (_) => _buildScrollLabel(context),
|
||||
labelPadding: const EdgeInsets.symmetric(horizontal: 40),
|
||||
enabled: _isScrollbarVisible,
|
||||
child: ScrollConfiguration(
|
||||
behavior: ScrollConfiguration.of(context)
|
||||
.copyWith(scrollbars: false),
|
||||
|
@ -380,10 +381,12 @@ class _HomePhotosState extends State<HomePhotos>
|
|||
state is ScanAccountDirBlocLoading) {
|
||||
_transformItems(state.files);
|
||||
if (state is ScanAccountDirBlocSuccess) {
|
||||
_isScrollbarVisible = true;
|
||||
_startupSync();
|
||||
_tryStartMetadataTask();
|
||||
}
|
||||
} else if (state is ScanAccountDirBlocFailure) {
|
||||
_isScrollbarVisible = true;
|
||||
_transformItems(state.files);
|
||||
if (isPageVisible()) {
|
||||
SnackBarManager().showSnackBar(SnackBar(
|
||||
|
@ -702,6 +705,8 @@ class _HomePhotosState extends State<HomePhotos>
|
|||
|
||||
late final _Web? _web = platform_k.isWeb ? _Web(this) : null;
|
||||
|
||||
var _isScrollbarVisible = false;
|
||||
|
||||
static final _log = Logger("widget.home_photos._HomePhotosState");
|
||||
static const _menuValueRefresh = 0;
|
||||
}
|
||||
|
|
|
@ -385,8 +385,8 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "v0.1.0-nc-photos-5"
|
||||
resolved-ref: a1a34c57a069dc1cffa9759f86ffab2e0c7420ca
|
||||
ref: "v0.1.0-nc-photos-6"
|
||||
resolved-ref: c3bb889b421451ef9944f25c55b12bda2f83d5c8
|
||||
url: "https://gitlab.com/nc-photos/flutter-draggable-scrollbar"
|
||||
source: git
|
||||
version: "0.1.0"
|
||||
|
|
|
@ -44,7 +44,7 @@ dependencies:
|
|||
draggable_scrollbar:
|
||||
git:
|
||||
url: https://gitlab.com/nc-photos/flutter-draggable-scrollbar
|
||||
ref: v0.1.0-nc-photos-5
|
||||
ref: v0.1.0-nc-photos-6
|
||||
drift: ^1.7.1
|
||||
equatable: ^2.0.0
|
||||
event_bus: ^2.0.0
|
||||
|
|
Loading…
Reference in a new issue