fix(profile): 修复懒加载骨架屏一直显示的问题

- 将懒加载区域的加载状态初始值改为 false
- 只有真正在加载时才显示骨架屏
- 修复条件判断逻辑导致的死锁问题

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
hailin 2025-12-15 21:19:22 -08:00
parent d29ff0975b
commit 0208022615
1 changed files with 8 additions and 8 deletions

View File

@ -106,7 +106,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
double _settledUsdt = 0.0;
double _expiredUsdt = 0.0;
double _expiredPower = 0.0;
bool _isLoadingWallet = true;
bool _isLoadingWallet = false; // false
String? _walletError;
//
@ -128,10 +128,10 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
int _unreadNotificationCount = 0;
// ========== + ==========
//
// false
bool _isLoadingUserData = true;
bool _isLoadingReferral = true;
bool _isLoadingAuthorization = true;
bool _isLoadingReferral = false;
bool _isLoadingAuthorization = false;
String? _userDataError;
String? _referralError;
String? _authorizationError;
@ -1403,8 +1403,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
///
Widget _buildReferralInfoCard() {
//
if (_isLoadingAuthorization && !_hasLoadedAuthorization) {
// -
if (_isLoadingAuthorization) {
return _buildSkeleton(height: 180);
}
@ -1559,8 +1559,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
///
Widget _buildMainContentCard() {
// -
if (_isLoadingWallet && !_hasLoadedWallet) {
// -
if (_isLoadingWallet) {
return _buildSkeleton(height: 400);
}