mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 02:39:05 +01:00
ContactExchangeErrorFragment: Address review comments
This commit is contained in:
@@ -119,13 +119,10 @@ public class ContactExchangeActivity extends KeyAgreementActivity implements
|
||||
return getString(R.string.authenticating_with_device);
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@UiThread
|
||||
@Override
|
||||
public String keyAgreementAborted(boolean remoteAborted) {
|
||||
showErrorFragment(remoteAborted ? R.string.connection_aborted_remote :
|
||||
R.string.connection_aborted_local);
|
||||
return null;
|
||||
public void keyAgreementAborted(boolean remoteAborted) {
|
||||
showErrorFragment(R.string.connection_error_explanation);
|
||||
}
|
||||
|
||||
@UiThread
|
||||
|
||||
@@ -49,9 +49,8 @@ public class ContactExchangeErrorFragment extends BaseFragment {
|
||||
public View onCreateView(LayoutInflater inflater,
|
||||
@Nullable ViewGroup container,
|
||||
@Nullable Bundle savedInstanceState) {
|
||||
View v = inflater
|
||||
.inflate(R.layout.fragment_error_contact_exchange, container,
|
||||
false);
|
||||
View v = inflater.inflate(R.layout.fragment_error_contact_exchange,
|
||||
container, false);
|
||||
|
||||
// set humanized error message
|
||||
TextView explanation = v.findViewById(R.id.errorMessage);
|
||||
|
||||
@@ -300,9 +300,7 @@ public class KeyAgreementFragment extends BaseEventFragment
|
||||
private void keyAgreementAborted(boolean remoteAborted) {
|
||||
runOnUiThreadUnlessDestroyed(() -> {
|
||||
reset();
|
||||
qrCodeView.setVisibility(VISIBLE);
|
||||
statusView.setVisibility(INVISIBLE);
|
||||
status.setText(listener.keyAgreementAborted(remoteAborted));
|
||||
listener.keyAgreementAborted(remoteAborted);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -361,10 +359,9 @@ public class KeyAgreementFragment extends BaseEventFragment
|
||||
@Nullable
|
||||
String keyAgreementStarted();
|
||||
|
||||
// Should return a string to be displayed as status.
|
||||
// Will show an error fragment.
|
||||
@UiThread
|
||||
@Nullable
|
||||
String keyAgreementAborted(boolean remoteAborted);
|
||||
void keyAgreementAborted(boolean remoteAborted);
|
||||
|
||||
// Should return a string to be displayed as status.
|
||||
@UiThread
|
||||
|
||||
@@ -143,8 +143,6 @@
|
||||
<string name="camera_error">Camera error</string>
|
||||
<string name="connecting_to_device">Connecting to device\u2026</string>
|
||||
<string name="authenticating_with_device">Authenticating with device\u2026</string>
|
||||
<string name="connection_aborted_local">The connection was aborted. Please try again! It might help to check that you\'re both connected to the same Wi-Fi network!</string>
|
||||
<string name="connection_aborted_remote">The connection was aborted by your contact\'s device. Please try again! It might help to check that you\'re both connected to the same Wi-Fi network!</string>
|
||||
<string name="connection_error_title">Could not connect to your contact</string>
|
||||
<string name="connection_error_explanation">Please check that you\'re both connected to the same Wi-Fi network.</string>
|
||||
<string name="connection_error_feedback">If this problem persists, please <a href="feedback">send feedback</a> to help us improve the app.</string>
|
||||
|
||||
Reference in New Issue
Block a user