translationConfigUpdated function

Future<void> translationConfigUpdated(
  1. TranslationConfigUpdatedOptions options
)

Handles the translation:configUpdated socket event. Called when the host changes room translation settings.

Implementation

Future<void> translationConfigUpdated(
    TranslationConfigUpdatedOptions options) async {
  try {
    final config = options.data.config;

    options.updateTranslationConfig?.call(config);

    options.showAlert?.call(
      message: 'Translation settings updated by host',
      type: 'info',
      duration: 2000,
    );
  } catch (e) {
    // Handle error silently
  }
}