mirror of
https://github.com/nextcloud/talk-android
synced 2025-01-31 11:32:00 +00:00
Upon error on saving, revert value
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
208e96e1c0
commit
ea50cf60e5
@ -462,6 +462,13 @@ public class ProfileController extends BaseController {
|
||||
@Override
|
||||
public void onError(@NotNull Throwable e) {
|
||||
item.text = userInfo.getValueByField(item.field);
|
||||
Toast.makeText(getApplicationContext(),
|
||||
String.format(getResources().getString(R.string.failed_to_save),
|
||||
item.text,
|
||||
item.field),
|
||||
Toast.LENGTH_LONG).show();
|
||||
adapter.updateFilteredList();
|
||||
adapter.notifyDataSetChanged();
|
||||
Log.e(TAG, "Failed to saved: " + item.text + " as " + item.field, e);
|
||||
}
|
||||
|
||||
|
@ -388,4 +388,5 @@
|
||||
<string name="path_password_strike_through" translatable="false" tools:override="true">M3.27,4.27L19.74,20.74</string>
|
||||
<string name="tooManyUnreadMessages" translatable="false">999+</string>
|
||||
<string name="nc_action_open_main_menu">Open main menu</string>
|
||||
<string name="failed_to_save">Failed to save %1$s as %2$s</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user