|
...
|
...
|
@@ -227,25 +227,20 @@ class CustomWatchThemePreviewController extends GetxController { |
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
var syncSuccess = true;
|
|
|
|
var syncSuccess = false;
|
|
|
|
try {
|
|
|
|
final success = await WearEngineHostApi().syncWatchTheme(downloadedTheme);
|
|
|
|
if (success) {
|
|
|
|
final result = await _themeApi.applyTheme(themeId);
|
|
|
|
if (result is! AppSuccess<void>) {
|
|
|
|
syncSuccess = await WearEngineHostApi().syncWatchTheme(downloadedTheme);
|
|
|
|
isApplying.value = false;
|
|
|
|
AppToast.show(l10n.watchThemeApplyFailed);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
syncSuccess = success;
|
|
|
|
}
|
|
|
|
selectedThemeItem.value = themeItem;
|
|
|
|
isApplying.value = false;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
syncSuccess = success;
|
|
|
|
return true;
|
|
|
|
} catch (_) {
|
|
|
|
// The active theme is already saved on the server.
|
|
|
|
syncSuccess = false;
|
|
|
|
}
|
|
|
|
isApplying.value = false;
|
|
|
|
if (!syncSuccess) {
|
...
|
...
|
|