Skip to content

Commit

Permalink
Fix sync error text on Android
Browse files Browse the repository at this point in the history
Now errors produced by join via QR and via sync words are the similar

fixes brave/brave-browser#23948
  • Loading branch information
AlexeyBarabash committed Jul 8, 2022
1 parent 7530673 commit 65b6891
Showing 1 changed file with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,16 +246,13 @@ public void onSyncError(String message) {
if (null == getActivity()) {
return;
}
if (null != message && !message.isEmpty()) {
message = " [" + message + "]";
}
final String messageFinal = (null == message) ? "" : message;
final String messageFinal = (null == message || message.isEmpty())
? getResources().getString(R.string.sync_device_failure)
: message;
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
showEndDialog(
getResources().getString(R.string.sync_device_failure) + messageFinal,
() -> {});
showEndDialog(messageFinal, () -> {});
}
});
} catch (Exception exc) {
Expand Down

0 comments on commit 65b6891

Please sign in to comment.