Don't show Toast off the UiThread

This commit is contained in:
Torsten Grote
2021-03-26 14:07:35 -03:00
parent 371d49a213
commit 29965e38d0

View File

@@ -243,10 +243,11 @@ class SettingsViewModel extends DbViewModel implements EventListener {
}); });
} }
@AnyThread
private void onSetAvatarFailed() { private void onSetAvatarFailed() {
Toast.makeText(getApplication(), androidExecutor.runOnUiThread(() -> Toast.makeText(getApplication(),
R.string.change_profile_picture_failed_message, R.string.change_profile_picture_failed_message, LENGTH_LONG)
LENGTH_LONG).show(); .show());
} }
LiveData<OwnIdentityInfo> getOwnIdentityInfo() { LiveData<OwnIdentityInfo> getOwnIdentityInfo() {