fix(recommend): 稳定进度拖动与清屏状态
This commit is contained in:
1 parent
76c4f1d411
commit
30b55afdd4
9 files changed
+339
-96
No files matched your search
@@ -23,6 +23,7 @@ class HomeLogic extends ChangeNotifier {
|
||||
bool drawerOpen = false;
|
||||
bool detailOpen = false;
|
||||
bool videoImmersive = false;
|
||||
bool scrubHidden = false;
|
||||
bool _dramaNotifyScheduled = false;
|
||||
bool _disposed = false;
|
||||
|
||||
@@ -144,6 +145,12 @@ class HomeLogic extends ChangeNotifier {
|
||||
notify();
|
||||
}
|
||||
|
||||
void onScrubVisibilityChanged(bool value) {
|
||||
if (scrubHidden == value) return;
|
||||
scrubHidden = value;
|
||||
notify();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_disposed = true;
|
||||
|
||||
@@ -239,7 +239,15 @@ class _HomeTabsState extends State<_HomeTabs> {
|
||||
backgroundColor: AppColors.transparent,
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: _body(context),
|
||||
bottomNavigationBar: logic.videoImmersive ? null : _nav(context),
|
||||
bottomNavigationBar: logic.videoImmersive
|
||||
? null
|
||||
: Visibility(
|
||||
visible: !logic.scrubHidden,
|
||||
maintainSize: true,
|
||||
maintainAnimation: true,
|
||||
maintainState: true,
|
||||
child: _nav(context),
|
||||
),
|
||||
),
|
||||
);
|
||||
return AnnotatedRegion<SystemUiOverlayStyle>(
|
||||
@@ -288,7 +296,7 @@ class _HomeTabsState extends State<_HomeTabs> {
|
||||
active: logic.tab == 1,
|
||||
onSearch: () => _openSearch(context),
|
||||
onOpenFilter: () => _pushPage(context, const FilterPage()),
|
||||
onScrubVisibilityChanged: logic.onImmersiveChanged,
|
||||
onScrubVisibilityChanged: logic.onScrubVisibilityChanged,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user