fix(mobile-app): 可结算奖励卡片去掉重复的权益类型前缀

memo 中已包含权益类型(如"分享权益:来自用户xxx的认种"),
卡片标题也显示了权益类型,所以只显示"来自用户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:01:19 -08:00
parent e9a64a8163
commit e8f65f3fcd
1 changed files with 23 additions and 10 deletions

View File

@ -612,6 +612,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
targetCount: 50000, // 5 targetCount: 50000, // 5
monthlyEarnings: r.monthlyEarnings, monthlyEarnings: r.monthlyEarnings,
isCurrentUser: r.isCurrentUser, isCurrentUser: r.isCurrentUser,
accountSequence: r.accountSequence,
)).toList(); )).toList();
}); });
} }
@ -645,6 +646,7 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
targetCount: 10000, // 1 targetCount: 10000, // 1
monthlyEarnings: r.monthlyEarnings, monthlyEarnings: r.monthlyEarnings,
isCurrentUser: r.isCurrentUser, isCurrentUser: r.isCurrentUser,
accountSequence: r.accountSequence,
)).toList(); )).toList();
}); });
} }
@ -2668,18 +2670,29 @@ 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) {
style: const TextStyle( // memo "分享权益来自用户D25122400000的认种"
fontSize: 11, // "来自用户xxx的认种"
fontFamily: 'Inter', String displayMemo = item.memo;
color: Color(0x995D4037), final colonIndex = displayMemo.indexOf('');
), if (colonIndex != -1 && colonIndex < displayMemo.length - 1) {
maxLines: 2, displayMemo = displayMemo.substring(colonIndex + 1);
overflow: TextOverflow.ellipsis, }
return Text(
displayMemo,
style: const TextStyle(
fontSize: 11,
fontFamily: 'Inter',
color: Color(0x995D4037),
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
);
},
), ),
], ],
], ],