修复资料卡问题
This commit is contained in:
parent
bae5ee44af
commit
a44bdd7287
@ -13,7 +13,6 @@ import '../../../ui_kit/components/sc_page_list.dart';
|
|||||||
import '../../../ui_kit/components/sc_tts.dart';
|
import '../../../ui_kit/components/sc_tts.dart';
|
||||||
import '../../../ui_kit/components/text/sc_text.dart';
|
import '../../../ui_kit/components/text/sc_text.dart';
|
||||||
import '../../../ui_kit/widgets/id/sc_special_id_badge.dart';
|
import '../../../ui_kit/widgets/id/sc_special_id_badge.dart';
|
||||||
import '../../../shared/tools/sc_lk_dialog_util.dart';
|
|
||||||
import '../../../ui_kit/widgets/badge/sc_user_badge_strip.dart';
|
import '../../../ui_kit/widgets/badge/sc_user_badge_strip.dart';
|
||||||
import '../../../ui_kit/widgets/room/room_user_info_card.dart';
|
import '../../../ui_kit/widgets/room/room_user_info_card.dart';
|
||||||
|
|
||||||
@ -44,7 +43,7 @@ class _RoomOnlinePageState
|
|||||||
if (dialogContext == null) {
|
if (dialogContext == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showBottomInBottomDialog(dialogContext, RoomUserInfoCard(userId: userId));
|
RoomUserInfoCard.showPreloaded(dialogContext, userId: userId);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
import 'package:flutter/cupertino.dart';
|
import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||||
import 'package:yumi/shared/business_logic/models/res/login_res.dart';
|
import 'package:yumi/shared/business_logic/models/res/login_res.dart';
|
||||||
import 'package:yumi/shared/data_sources/sources/local/user_manager.dart';
|
import 'package:yumi/shared/data_sources/sources/local/user_manager.dart';
|
||||||
import 'package:yumi/shared/data_sources/sources/repositories/sc_room_repository_imp.dart';
|
import 'package:yumi/shared/data_sources/sources/repositories/sc_room_repository_imp.dart';
|
||||||
import 'package:yumi/main.dart';
|
import 'package:yumi/main.dart';
|
||||||
|
|
||||||
import 'package:yumi/app_localizations.dart';
|
import 'package:yumi/app_localizations.dart';
|
||||||
@ -13,7 +13,6 @@ import 'package:yumi/ui_kit/components/sc_compontent.dart';
|
|||||||
import 'package:yumi/ui_kit/components/sc_page_list.dart';
|
import 'package:yumi/ui_kit/components/sc_page_list.dart';
|
||||||
import 'package:yumi/ui_kit/components/text/sc_text.dart';
|
import 'package:yumi/ui_kit/components/text/sc_text.dart';
|
||||||
import 'package:yumi/ui_kit/components/sc_tts.dart';
|
import 'package:yumi/ui_kit/components/sc_tts.dart';
|
||||||
import 'package:yumi/shared/tools/sc_lk_dialog_util.dart';
|
|
||||||
import 'package:yumi/shared/business_logic/models/res/room_gift_rank_res.dart';
|
import 'package:yumi/shared/business_logic/models/res/room_gift_rank_res.dart';
|
||||||
import 'package:yumi/ui_kit/widgets/id/sc_special_id_badge.dart';
|
import 'package:yumi/ui_kit/widgets/id/sc_special_id_badge.dart';
|
||||||
import 'package:yumi/ui_kit/widgets/room/room_user_info_card.dart';
|
import 'package:yumi/ui_kit/widgets/room/room_user_info_card.dart';
|
||||||
@ -98,11 +97,11 @@ class _RoomGiftRankTabPageState
|
|||||||
// headdress: userInfo.userProfile?.getHeaddress()?.sourceUrl,
|
// headdress: userInfo.userProfile?.getHeaddress()?.sourceUrl,
|
||||||
),
|
),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
showBottomInBottomDialog(
|
|
||||||
navigatorKey.currentState!.context,
|
|
||||||
RoomUserInfoCard(userId: userProfile?.id),
|
|
||||||
);
|
|
||||||
SmartDialog.dismiss(tag: "showRoomGiftRankPage");
|
SmartDialog.dismiss(tag: "showRoomGiftRankPage");
|
||||||
|
RoomUserInfoCard.showPreloaded(
|
||||||
|
navigatorKey.currentState!.context,
|
||||||
|
userId: userProfile?.id,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
SizedBox(width: 3.w),
|
SizedBox(width: 3.w),
|
||||||
@ -119,7 +118,7 @@ class _RoomGiftRankTabPageState
|
|||||||
needScroll:
|
needScroll:
|
||||||
(userProfile?.userNickname?.characters.length ??
|
(userProfile?.userNickname?.characters.length ??
|
||||||
0) >
|
0) >
|
||||||
14,
|
14,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -137,7 +136,7 @@ class _RoomGiftRankTabPageState
|
|||||||
animationHeight: 24.w,
|
animationHeight: 24.w,
|
||||||
showTextBesideAnimated: true,
|
showTextBesideAnimated: true,
|
||||||
animatedTextSpacing: 0,
|
animatedTextSpacing: 0,
|
||||||
showAnimatedGradientText:
|
showAnimatedGradientText:
|
||||||
userProfile
|
userProfile
|
||||||
?.shouldShowColoredSpecialIdText() ??
|
?.shouldShowColoredSpecialIdText() ??
|
||||||
false,
|
false,
|
||||||
@ -195,24 +194,24 @@ class _RoomGiftRankTabPageState
|
|||||||
SocialChatUserProfile? _mergeCurrentUserVip(
|
SocialChatUserProfile? _mergeCurrentUserVip(
|
||||||
SocialChatUserProfile? profile,
|
SocialChatUserProfile? profile,
|
||||||
) {
|
) {
|
||||||
if (profile == null || profile.vipLevelForColoredId > 0) {
|
if (profile == null || profile.vipLevelForColoredId > 0) {
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
final currentProfile = AccountStorage().getCurrentUser()?.userProfile;
|
final currentProfile = AccountStorage().getCurrentUser()?.userProfile;
|
||||||
if (currentProfile == null ||
|
if (currentProfile == null ||
|
||||||
currentProfile.vipLevelForColoredId <= 0 ||
|
currentProfile.vipLevelForColoredId <= 0 ||
|
||||||
currentProfile.id != profile.id) {
|
currentProfile.id != profile.id) {
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
return profile.copyWith(
|
return profile.copyWith(
|
||||||
vipLevel:
|
vipLevel:
|
||||||
currentProfile.vipLevel ??
|
currentProfile.vipLevel ??
|
||||||
currentProfile.vipLevelForColoredId.toString(),
|
currentProfile.vipLevelForColoredId.toString(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
empty() {
|
empty() {
|
||||||
return mainEmpty(
|
return mainEmpty(
|
||||||
image: Image.asset(
|
image: Image.asset(
|
||||||
'sc_images/general/sc_icon_loading.png',
|
'sc_images/general/sc_icon_loading.png',
|
||||||
|
|||||||
@ -5197,10 +5197,7 @@ class RealTimeCommunicationManager extends ChangeNotifier {
|
|||||||
if (clickUser.id ==
|
if (clickUser.id ==
|
||||||
AccountStorage().getCurrentUser()?.userProfile?.id) {
|
AccountStorage().getCurrentUser()?.userProfile?.id) {
|
||||||
///是自己,直接打开资料卡
|
///是自己,直接打开资料卡
|
||||||
showBottomInBottomDialog(
|
RoomUserInfoCard.showPreloaded(context!, userId: clickUser.id);
|
||||||
context!,
|
|
||||||
RoomUserInfoCard(userId: clickUser.id),
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
showBottomInBottomDialog(
|
showBottomInBottomDialog(
|
||||||
context!,
|
context!,
|
||||||
@ -5441,10 +5438,7 @@ class RealTimeCommunicationManager extends ChangeNotifier {
|
|||||||
if (normalizedUserId.isEmpty) {
|
if (normalizedUserId.isEmpty) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showBottomInBottomDialog(
|
RoomUserInfoCard.showPreloaded(context!, userId: normalizedUserId);
|
||||||
context!,
|
|
||||||
RoomUserInfoCard(userId: normalizedUserId),
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
addSoundVoiceChangeListener(OnSoundVoiceChange onSoundVoiceChange) {
|
addSoundVoiceChangeListener(OnSoundVoiceChange onSoundVoiceChange) {
|
||||||
|
|||||||
@ -250,7 +250,7 @@ class SocialChatUserProfileManager extends ChangeNotifier {
|
|||||||
return sessionSerial;
|
return sessionSerial;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> roomUserCard(
|
Future<RoomUserCardRes?> roomUserCard(
|
||||||
String roomId,
|
String roomId,
|
||||||
String userId, {
|
String userId, {
|
||||||
int? sessionSerial,
|
int? sessionSerial,
|
||||||
@ -272,36 +272,31 @@ class SocialChatUserProfileManager extends ChangeNotifier {
|
|||||||
isUserCardLoading = false;
|
isUserCardLoading = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
RoomUserCardRes? card = await SCChatRoomRepository().roomUserCard(
|
final card = await _loadHydratedRoomUserCard(
|
||||||
normalizedRoomId,
|
roomId: normalizedRoomId,
|
||||||
normalizedUserId,
|
userId: normalizedUserId,
|
||||||
);
|
);
|
||||||
if (requestSerial != _userCardRequestSerial) {
|
if (requestSerial != _userCardRequestSerial ||
|
||||||
return;
|
activeSessionSerial != _activeUserCardSessionSerial) {
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
userCardInfo = card;
|
userCardInfo = card;
|
||||||
userCardLoadError = null;
|
userCardLoadError = null;
|
||||||
isUserCardLoading = false;
|
isUserCardLoading = false;
|
||||||
isUserCardRelationLoading = card.userProfile != null;
|
isUserCardRelationLoading = false;
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
unawaited(
|
return card;
|
||||||
_hydrateRoomUserCard(
|
|
||||||
card: card,
|
|
||||||
userId: normalizedUserId,
|
|
||||||
requestSerial: requestSerial,
|
|
||||||
sessionSerial: activeSessionSerial,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
} catch (error, stackTrace) {
|
} catch (error, stackTrace) {
|
||||||
if (requestSerial != _userCardRequestSerial) {
|
if (requestSerial != _userCardRequestSerial) {
|
||||||
return;
|
return null;
|
||||||
}
|
}
|
||||||
userCardInfo = null;
|
userCardInfo = null;
|
||||||
userCardLoadError = error;
|
userCardLoadError = error;
|
||||||
|
isUserCardRelationLoading = false;
|
||||||
_debugProfileLoadFailure(
|
_debugProfileLoadFailure(
|
||||||
scope: 'roomCard',
|
scope: 'roomCard',
|
||||||
userId: normalizedUserId,
|
userId: normalizedUserId,
|
||||||
@ -314,6 +309,23 @@ class SocialChatUserProfileManager extends ChangeNotifier {
|
|||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<RoomUserCardRes?> preloadRoomUserCardForOpen(
|
||||||
|
String roomId,
|
||||||
|
String userId, {
|
||||||
|
int? sessionSerial,
|
||||||
|
}) {
|
||||||
|
return roomUserCard(roomId, userId, sessionSerial: sessionSerial);
|
||||||
|
}
|
||||||
|
|
||||||
|
Future<RoomUserCardRes?> _loadHydratedRoomUserCard({
|
||||||
|
required String roomId,
|
||||||
|
required String userId,
|
||||||
|
}) async {
|
||||||
|
final card = await SCChatRoomRepository().roomUserCard(roomId, userId);
|
||||||
|
return _withCurrentVipLevelForCard(card, userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _hydrateUserInfoById({
|
Future<void> _hydrateUserInfoById({
|
||||||
@ -340,38 +352,6 @@ class SocialChatUserProfileManager extends ChangeNotifier {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _hydrateRoomUserCard({
|
|
||||||
required RoomUserCardRes? card,
|
|
||||||
required String userId,
|
|
||||||
required int requestSerial,
|
|
||||||
required int sessionSerial,
|
|
||||||
}) async {
|
|
||||||
try {
|
|
||||||
final hydratedCard = await _withCurrentVipLevelForCard(card, userId);
|
|
||||||
if (requestSerial != _userCardRequestSerial ||
|
|
||||||
sessionSerial != _activeUserCardSessionSerial ||
|
|
||||||
hydratedCard == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
userCardInfo = hydratedCard;
|
|
||||||
userCardLoadError = null;
|
|
||||||
isUserCardRelationLoading = false;
|
|
||||||
notifyListeners();
|
|
||||||
} catch (error, stackTrace) {
|
|
||||||
if (requestSerial == _userCardRequestSerial &&
|
|
||||||
sessionSerial == _activeUserCardSessionSerial) {
|
|
||||||
isUserCardRelationLoading = false;
|
|
||||||
notifyListeners();
|
|
||||||
}
|
|
||||||
_debugProfileLoadFailure(
|
|
||||||
scope: 'roomCardHydrate',
|
|
||||||
userId: userId,
|
|
||||||
error: error,
|
|
||||||
stackTrace: stackTrace,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void clearRoomUserCard({int? sessionSerial}) {
|
void clearRoomUserCard({int? sessionSerial}) {
|
||||||
if (sessionSerial != null &&
|
if (sessionSerial != null &&
|
||||||
sessionSerial != _activeUserCardSessionSerial) {
|
sessionSerial != _activeUserCardSessionSerial) {
|
||||||
|
|||||||
@ -9,7 +9,6 @@ import 'package:yumi/ui_kit/widgets/room/room_user_info_card.dart';
|
|||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:yumi/app/constants/sc_room_msg_type.dart';
|
import 'package:yumi/app/constants/sc_room_msg_type.dart';
|
||||||
import 'package:yumi/app/constants/sc_screen.dart';
|
import 'package:yumi/app/constants/sc_screen.dart';
|
||||||
import 'package:yumi/shared/tools/sc_lk_dialog_util.dart';
|
|
||||||
import 'package:yumi/shared/data_sources/sources/local/user_manager.dart';
|
import 'package:yumi/shared/data_sources/sources/local/user_manager.dart';
|
||||||
import 'package:yumi/shared/business_logic/models/res/mic_res.dart';
|
import 'package:yumi/shared/business_logic/models/res/mic_res.dart';
|
||||||
import 'package:yumi/services/audio/rtc_manager.dart';
|
import 'package:yumi/services/audio/rtc_manager.dart';
|
||||||
@ -266,10 +265,7 @@ class EmptyMaiSelect extends StatelessWidget {
|
|||||||
context,
|
context,
|
||||||
() {
|
() {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
showBottomInBottomDialog(
|
RoomUserInfoCard.showPreloaded(context, userId: clickUser?.id);
|
||||||
context,
|
|
||||||
RoomUserInfoCard(userId: clickUser?.id),
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@ -48,8 +48,91 @@ import '../../../modules/chat/chat_route.dart';
|
|||||||
|
|
||||||
class RoomUserInfoCard extends StatefulWidget {
|
class RoomUserInfoCard extends StatefulWidget {
|
||||||
final String? userId;
|
final String? userId;
|
||||||
|
final String? roomId;
|
||||||
|
final int? sessionSerial;
|
||||||
|
final bool preloaded;
|
||||||
|
|
||||||
const RoomUserInfoCard({super.key, this.userId});
|
const RoomUserInfoCard({
|
||||||
|
super.key,
|
||||||
|
this.userId,
|
||||||
|
this.roomId,
|
||||||
|
this.sessionSerial,
|
||||||
|
this.preloaded = false,
|
||||||
|
});
|
||||||
|
|
||||||
|
static int _openRequestSerial = 0;
|
||||||
|
|
||||||
|
static Future<void> showPreloaded(
|
||||||
|
BuildContext context, {
|
||||||
|
required String? userId,
|
||||||
|
}) async {
|
||||||
|
final normalizedUserId = (userId ?? '').trim();
|
||||||
|
if (normalizedUserId.isEmpty) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final openSerial = ++_openRequestSerial;
|
||||||
|
final sourceRoomId = _resolveCurrentRoomId(context);
|
||||||
|
final dialogContext = navigatorKey.currentState?.context ?? context;
|
||||||
|
final userProvider = Provider.of<SocialChatUserProfileManager>(
|
||||||
|
dialogContext,
|
||||||
|
listen: false,
|
||||||
|
);
|
||||||
|
final roomId =
|
||||||
|
sourceRoomId.isNotEmpty
|
||||||
|
? sourceRoomId
|
||||||
|
: _resolveCurrentRoomId(dialogContext);
|
||||||
|
final sessionSerial = userProvider.beginRoomUserCardSession();
|
||||||
|
SCLoadingManager.show();
|
||||||
|
room_card.RoomUserCardRes? card;
|
||||||
|
try {
|
||||||
|
card = await userProvider.preloadRoomUserCardForOpen(
|
||||||
|
roomId,
|
||||||
|
normalizedUserId,
|
||||||
|
sessionSerial: sessionSerial,
|
||||||
|
);
|
||||||
|
} finally {
|
||||||
|
if (openSerial == _openRequestSerial) {
|
||||||
|
SCLoadingManager.hide();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (openSerial != _openRequestSerial) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
final latestDialogContext = navigatorKey.currentState?.context ?? context;
|
||||||
|
if (!latestDialogContext.mounted) {
|
||||||
|
userProvider.clearRoomUserCard(sessionSerial: sessionSerial);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (card == null) {
|
||||||
|
userProvider.clearRoomUserCard(sessionSerial: sessionSerial);
|
||||||
|
SCTts.show(
|
||||||
|
SCAppLocalizations.of(latestDialogContext)?.loadingFailedClickToRetry ??
|
||||||
|
'Loading failed, click to retry',
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
showBottomInBottomDialog(
|
||||||
|
latestDialogContext,
|
||||||
|
RoomUserInfoCard(
|
||||||
|
userId: normalizedUserId,
|
||||||
|
roomId: roomId,
|
||||||
|
sessionSerial: sessionSerial,
|
||||||
|
preloaded: true,
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
static String _resolveCurrentRoomId(BuildContext context) {
|
||||||
|
try {
|
||||||
|
return Provider.of<RtcProvider>(
|
||||||
|
context,
|
||||||
|
listen: false,
|
||||||
|
).currenRoom?.roomProfile?.roomProfile?.id ??
|
||||||
|
"";
|
||||||
|
} catch (_) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
State<RoomUserInfoCard> createState() => _RoomUserInfoCardState();
|
State<RoomUserInfoCard> createState() => _RoomUserInfoCardState();
|
||||||
@ -76,12 +159,16 @@ class _RoomUserInfoCardState extends State<RoomUserInfoCard> {
|
|||||||
context,
|
context,
|
||||||
listen: false,
|
listen: false,
|
||||||
);
|
);
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
roomId = widget.roomId?.trim() ?? "";
|
||||||
if (!mounted) {
|
_userCardSessionSerial = widget.sessionSerial;
|
||||||
return;
|
if (!widget.preloaded) {
|
||||||
}
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
_loadRoomUserCard();
|
if (!mounted) {
|
||||||
});
|
return;
|
||||||
|
}
|
||||||
|
_loadRoomUserCard();
|
||||||
|
});
|
||||||
|
}
|
||||||
SCAccountRepository().userIdentity(userId: widget.userId).then((v) {
|
SCAccountRepository().userIdentity(userId: widget.userId).then((v) {
|
||||||
if (!mounted) {
|
if (!mounted) {
|
||||||
return;
|
return;
|
||||||
@ -96,12 +183,7 @@ class _RoomUserInfoCardState extends State<RoomUserInfoCard> {
|
|||||||
context,
|
context,
|
||||||
listen: false,
|
listen: false,
|
||||||
);
|
);
|
||||||
roomId =
|
roomId = RoomUserInfoCard._resolveCurrentRoomId(context);
|
||||||
Provider.of<RtcProvider>(
|
|
||||||
context,
|
|
||||||
listen: false,
|
|
||||||
).currenRoom?.roomProfile?.roomProfile?.id ??
|
|
||||||
"";
|
|
||||||
final sessionSerial = userProvider?.beginRoomUserCardSession();
|
final sessionSerial = userProvider?.beginRoomUserCardSession();
|
||||||
_userCardSessionSerial = sessionSerial;
|
_userCardSessionSerial = sessionSerial;
|
||||||
userProvider?.roomUserCard(
|
userProvider?.roomUserCard(
|
||||||
@ -244,12 +326,13 @@ class _RoomUserInfoCardState extends State<RoomUserInfoCard> {
|
|||||||
required bool relationLoading,
|
required bool relationLoading,
|
||||||
}) {
|
}) {
|
||||||
final defaultSheetHeight = screenHeight * _profileSheetHeightFactor;
|
final defaultSheetHeight = screenHeight * _profileSheetHeightFactor;
|
||||||
|
final compactBadgeHeightDelta = 10.w;
|
||||||
if (relationLoading) {
|
if (relationLoading) {
|
||||||
return defaultSheetHeight;
|
return defaultSheetHeight + compactBadgeHeightDelta;
|
||||||
}
|
}
|
||||||
final hasCpRelation = _hasCpRelation(profile);
|
final hasCpRelation = _hasCpRelation(profile);
|
||||||
final hasCloseFriends = _closeFriendProfileData(profile).isNotEmpty;
|
final hasCloseFriends = _closeFriendProfileData(profile).isNotEmpty;
|
||||||
var resolvedHeight = defaultSheetHeight;
|
var resolvedHeight = defaultSheetHeight + compactBadgeHeightDelta;
|
||||||
if (!hasCpRelation) {
|
if (!hasCpRelation) {
|
||||||
resolvedHeight -= 126.w;
|
resolvedHeight -= 126.w;
|
||||||
}
|
}
|
||||||
@ -602,16 +685,16 @@ class _RoomUserInfoCardState extends State<RoomUserInfoCard> {
|
|||||||
) {
|
) {
|
||||||
return SizedBox(
|
return SizedBox(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 20.w,
|
height: 30.w,
|
||||||
child: Center(
|
child: Center(
|
||||||
child: SCUserBadgeStrip(
|
child: SCUserBadgeStrip(
|
||||||
userId: userId,
|
userId: userId,
|
||||||
fallbackBadges: _roomCardFallbackBadges(ref, profile),
|
fallbackBadges: _roomCardFallbackBadges(ref, profile),
|
||||||
displayScope: SCUserBadgeDisplayScope.short,
|
displayScope: SCUserBadgeDisplayScope.short,
|
||||||
height: 20.w,
|
height: 30.w,
|
||||||
badgeHeight: 20.w,
|
badgeHeight: 28.w,
|
||||||
longBadgeWidth: 44.w,
|
longBadgeWidth: 62.w,
|
||||||
spacing: 5.w,
|
spacing: 6.w,
|
||||||
maxBadges: 3,
|
maxBadges: 3,
|
||||||
wrap: false,
|
wrap: false,
|
||||||
reserveSpace: false,
|
reserveSpace: false,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user