mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-07-26 05:20:09 +08:00
@@ -452,7 +452,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
),
|
||||
Expanded(
|
||||
child: FilledButton.tonal(
|
||||
onPressed: onFollow,
|
||||
onPressed: !isOwner && relation == -1 ? null : onFollow,
|
||||
style: FilledButton.styleFrom(
|
||||
backgroundColor: relation != 0
|
||||
? colorScheme.onInverseSurface
|
||||
@@ -461,12 +461,22 @@ class UserInfoCard extends StatelessWidget {
|
||||
visualDensity: const VisualDensity(vertical: -1.8),
|
||||
),
|
||||
child: Text.rich(
|
||||
style: TextStyle(
|
||||
color: relation != 0 ? colorScheme.outline : null,
|
||||
),
|
||||
style: relation != 0
|
||||
? TextStyle(color: colorScheme.outline)
|
||||
: null,
|
||||
TextSpan(
|
||||
children: [
|
||||
if (relation != 0 && relation != 128) ...[
|
||||
if (relation == -1) ...[
|
||||
WidgetSpan(
|
||||
alignment: .middle,
|
||||
child: Icon(
|
||||
Icons.block,
|
||||
size: 16,
|
||||
color: colorScheme.outline,
|
||||
),
|
||||
),
|
||||
const TextSpan(text: ' '),
|
||||
] else if (relation != 0 && relation != 128) ...[
|
||||
WidgetSpan(
|
||||
alignment: .middle,
|
||||
child: Icon(
|
||||
@@ -481,7 +491,7 @@ class UserInfoCard extends StatelessWidget {
|
||||
text: isOwner
|
||||
? '编辑资料'
|
||||
: switch (relation) {
|
||||
0 => '关注',
|
||||
0 || -1 => '关注',
|
||||
1 => '悄悄关注',
|
||||
2 => '已关注',
|
||||
// 3 => '回关',
|
||||
|
||||
Reference in New Issue
Block a user