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,18 +2205,29 @@ class _ProfilePageState extends ConsumerState<ProfilePage> {
),
),
),
//
// memo
if (item.memo.isNotEmpty) ...[
const SizedBox(height: 4),
Text(
item.memo,
style: const TextStyle(
fontSize: 11,
fontFamily: 'Inter',
color: Color(0x995D4037),
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
Builder(
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(
fontSize: 11,
fontFamily: 'Inter',
color: Color(0x995D4037),
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
);
},
),
],
],