This commit is contained in:
2026-08-07 17:11:35 +08:00
parent 299f44fe57
commit ce89434a39
+11 -2
View File
@@ -35,7 +35,11 @@ class _EventInfoPageState extends ConsumerState<EventInfoPage> {
// allowByeMatch = 0 (直接晋级) // allowByeMatch = 0 (直接晋级)
// allowByeMatch = 1 (和败方对战) // allowByeMatch = 1 (和败方对战)
// allowByeMatch = -1 (个人赛不适用此配置,所以 = -1) // allowByeMatch = -1 (个人赛不适用此配置,所以 = -1)
if (item.allowByeMatch == 0) { // 如果比赛已结束 点击反应
if (item.completed) return;
final opponent = item.opponentName.trim();
if (opponent.isEmpty &&
(item.allowByeMatch == 0 || item.allowByeMatch == 1)) {
return; return;
} }
detail = await ref detail = await ref
@@ -530,7 +534,12 @@ String _formatMemberLine(EventRegistrationItem item) {
String _formatOpponentLine(EventRegistrationItem item) { String _formatOpponentLine(EventRegistrationItem item) {
final opponent = item.opponentName.trim(); final opponent = item.opponentName.trim();
if (opponent.isEmpty) return ''; if (opponent.isEmpty && item.allowByeMatch == 0) {
return item.completed ? '对手:轮空' : '';
}
if (opponent.isEmpty && item.allowByeMatch == 1) {
return '对手:待分配';
}
return '对手:$opponent'; return '对手:$opponent';
} }