fix(mobile-app): 待领取奖励卡片也去掉重复的权益类型前缀

与可结算卡片保持一致,只显示"来自用户xxx的认种"部分

🤖 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-24 01:02:38 -08:00
parent e8f65f3fcd
commit f73e477041
1 changed files with 21 additions and 10 deletions

View File

@ -2205,11 +2205,20 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
), ),
), ),
), ),
// // memo
if (item.memo.isNotEmpty) ...[ if (item.memo.isNotEmpty) ...[
const SizedBox(height: 4), const SizedBox(height: 4),
Text( Builder(
item.memo, builder: (context) {
// memo "分享权益来自用户D25122400000的认种"
// "来自用户xxx的认种"
String displayMemo = item.memo;
final colonIndex = displayMemo.indexOf('');
if (colonIndex != -1 && colonIndex < displayMemo.length - 1) {
displayMemo = displayMemo.substring(colonIndex + 1);
}
return Text(
displayMemo,
style: const TextStyle( style: const TextStyle(
fontSize: 11, fontSize: 11,
fontFamily: 'Inter', fontFamily: 'Inter',
@ -2217,6 +2226,8 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
), ),
maxLines: 2, maxLines: 2,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
);
},
), ),
], ],
], ],