Only allow new introductions in START state

When the user attempts an introduction, instead of the introduction
message input field, an explanatory text will be shown and the
introduction can not be made until the last one has been finished.
This commit is contained in:
Torsten Grote
2018-04-25 12:05:15 -03:00
parent 94a6137a42
commit b291fcd2cd
6 changed files with 88 additions and 13 deletions

View File

@@ -94,13 +94,25 @@
android:layout_gravity="center"
tools:visibility="gone"/>
<TextView
android:id="@+id/introductionNotPossibleView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/margin_activity_horizontal"
android:text="@string/introduction_not_possible"
android:textSize="@dimen/text_size_large"
android:visibility="gone"
tools:visibility="visible"/>
<org.briarproject.briar.android.view.LargeTextInputView
android:id="@+id/introductionMessageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
app:buttonText="@string/introduction_button"
app:hint="@string/introduction_message_hint"
app:maxLines="5"/>
app:maxLines="5"
tools:visibility="visible"/>
</LinearLayout>
</ScrollView>

View File

@@ -144,6 +144,7 @@
<string name="introduction_onboarding_title">Introduce your contacts</string>
<string name="introduction_onboarding_text">You can introduce your contacts to each other, so they don\'t need to meet in person to connect on Briar.</string>
<string name="introduction_activity_title">Select Contact</string>
<string name="introduction_not_possible">You already have one introduction in progress with these contacts. Please allow for this to finish first. If you or your contacts are rarely online, this can take some time.</string>
<string name="introduction_message_title">Introduce Contacts</string>
<string name="introduction_message_hint">Add a message (optional)</string>
<string name="introduction_button">Make Introduction</string>