From 59835732a0638d3ca21fc608ce44c924e4a462d3 Mon Sep 17 00:00:00 2001 From: Achraf Labidi Date: Mon, 29 Jan 2024 18:51:18 +0100 Subject: [PATCH] fix name updating un 3 months range --- lib/base/networking/api/handler/settings_handler.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/base/networking/api/handler/settings_handler.dart b/lib/base/networking/api/handler/settings_handler.dart index 476cf84..81748a5 100644 --- a/lib/base/networking/api/handler/settings_handler.dart +++ b/lib/base/networking/api/handler/settings_handler.dart @@ -64,7 +64,7 @@ class SettingsHandler { /// This method sends a `patchUserSettings` gRPC call to update the user's preferred name on the server. /// * [newName] - The new preferred name. /// Returns `true` if the update was successful. - Future updatePreferredName(String newName) async { + Future updatePreferredName(String newName) async { try { _logger.i('Updating user settings...'); final request = PatchUserSettingsRequest() @@ -77,10 +77,9 @@ class SettingsHandler { _logger.i('User settings updated successfully'); }, ); - return true; } catch (e) { _logger.e('Error updating user settings: $e'); - return false; + rethrow; } }