Rename "connected" state to "connecting".

This commit is contained in:
akwizgran
2019-06-06 17:21:52 +01:00
parent dc741e988c
commit 15d9ff1ebd
4 changed files with 4 additions and 4 deletions

View File

@@ -3,7 +3,7 @@ package org.briarproject.bramble.api.contact;
public enum PendingContactState { public enum PendingContactState {
WAITING_FOR_CONNECTION, WAITING_FOR_CONNECTION,
CONNECTED, CONNECTING,
ADDING_CONTACT, ADDING_CONTACT,
FAILED FAILED
} }

View File

@@ -52,7 +52,7 @@ class PendingContactViewHolder extends ViewHolder {
.getColor(status.getContext(), R.color.briar_yellow); .getColor(status.getContext(), R.color.briar_yellow);
status.setText(R.string.waiting_for_contact_to_come_online); status.setText(R.string.waiting_for_contact_to_come_online);
break; break;
case CONNECTED: case CONNECTING:
status.setText(R.string.connecting); status.setText(R.string.connecting);
break; break;
case ADDING_CONTACT: case ADDING_CONTACT:

View File

@@ -131,7 +131,7 @@ This will return a JSON array of pending contacts and their states:
The state can be one of these values: The state can be one of these values:
* `waiting_for_connection` * `waiting_for_connection`
* `connected` * `connecting`
* `adding_contact` * `adding_contact`
* `failed` * `failed`

View File

@@ -16,7 +16,7 @@ internal fun PendingContact.output() = JsonDict(
internal fun PendingContactState.output() = when(this) { internal fun PendingContactState.output() = when(this) {
WAITING_FOR_CONNECTION -> "waiting_for_connection" WAITING_FOR_CONNECTION -> "waiting_for_connection"
CONNECTED -> "connected" CONNECTING -> "connecting"
ADDING_CONTACT -> "adding_contact" ADDING_CONTACT -> "adding_contact"
FAILED -> "failed" FAILED -> "failed"
else -> throw AssertionError() else -> throw AssertionError()