fix(build): resolve undefined method compilation error in SettingsPage

- Expose resolveAcpBridgeServerEffectiveConfig via SettingsControllerAccountExtension
- Rename internal implementation to resolveAcpBridgeServerEffectiveConfigInternal
- Update SettingsPage to call the extension method correctly
This commit is contained in:
Haitao Pan 2026-04-19 12:47:13 +08:00
parent dc95abbfb0
commit 0fd5d66675
3 changed files with 12 additions and 4 deletions

View File

@ -121,8 +121,7 @@ class _SettingsPageState extends State<SettingsPage> {
);
// Resolve the effective config based on the new sources
final nextEffective = resolveAcpBridgeServerEffectiveConfig(
widget.controller.settingsController,
final nextEffective = widget.controller.settingsController.resolveAcpBridgeServerEffectiveConfig(
config: nextBridgeConfig,
accountSyncState: widget.controller.settingsController.accountSyncState,
);

View File

@ -118,6 +118,15 @@ extension SettingsControllerAccountExtension on SettingsController {
Future<void> cancelAccountMfaChallenge() =>
cancelAccountMfaChallengeSettingsInternal(this);
AcpBridgeServerEffectiveConfig resolveAcpBridgeServerEffectiveConfig({
required AcpBridgeServerModeConfig config,
AccountSyncState? accountSyncState,
}) => resolveAcpBridgeServerEffectiveConfigInternal(
this,
config: config,
accountSyncState: accountSyncState,
);
List<SecretReferenceEntry> buildSecretReferences() {
final entries = <SecretReferenceEntry>[
...secureRefsInternal.entries.map(

View File

@ -322,7 +322,7 @@ Future<AccountSyncResult> syncAccountSettingsInternal(
final currentSettings = controller.snapshotInternal;
final currentModeConfig = currentSettings.acpBridgeServerModeConfig;
final nextEffective = resolveAcpBridgeServerEffectiveConfig(
final nextEffective = resolveAcpBridgeServerEffectiveConfigInternal(
controller,
config: currentModeConfig,
accountSyncState: nextState,
@ -580,7 +580,7 @@ String _resolveBridgeServerUrl(Map<String, dynamic> payload) {
return '';
}
AcpBridgeServerEffectiveConfig resolveAcpBridgeServerEffectiveConfig(
AcpBridgeServerEffectiveConfig resolveAcpBridgeServerEffectiveConfigInternal(
SettingsController controller, {
required AcpBridgeServerModeConfig config,
AccountSyncState? accountSyncState,