1e22f27de2
- Add invite code display and binding functionality via API - Fix notification unread count sync on auth state change - Improve notification mark read with server state validation - Add auth state listener to trigger notification refresh - Add YaoCoinConverter for coin-to-yao type conversion - Remove YaoLegend from divination screens (UI cleanup) - Abbreviate relation labels in yao detail view - Add re-register notice to account delete screen - Update 'coins' terminology to 'points' in localization - Fix backend points consumption to only run in CHAT mode - Add HttpxAuthNoiseFilter to suppress auth endpoint logging - Fix notification static_schema import path - Add test coverage for notification bloc error handling - Update AGENTS.md page header rules and image handling - Delete deprecated run-dev.sh script
20 lines
457 B
Dart
20 lines
457 B
Dart
import 'divination_params.dart';
|
|
|
|
class YaoCoinConverter {
|
|
const YaoCoinConverter._();
|
|
|
|
static YaoType fromHuaCount(int huaCount) {
|
|
return switch (huaCount) {
|
|
0 => YaoType.oldYin,
|
|
1 => YaoType.youngYang,
|
|
2 => YaoType.youngYin,
|
|
3 => YaoType.oldYang,
|
|
_ => throw ArgumentError.value(huaCount, 'huaCount', 'must be 0..3'),
|
|
};
|
|
}
|
|
|
|
static YaoType fromZiCount(int ziCount) {
|
|
return fromHuaCount(3 - ziCount);
|
|
}
|
|
}
|