From 7036706485fd86d431bb846b53a40693b71578e8 Mon Sep 17 00:00:00 2001 From: Niels Andriesse Date: Wed, 5 Feb 2020 10:36:26 +1100 Subject: [PATCH] Debug --- res/layout-sw400dp/fragment_enter_chat_url.xml | 2 +- res/layout/activity_create_closed_group.xml | 14 +++++++++++++- res/layout/fragment_enter_chat_url.xml | 2 +- res/menu/conversation_push_group_options.xml | 4 ++-- .../conversation/ConversationActivity.java | 9 +++++---- .../activities/CreateClosedGroupActivity.kt | 7 +++++-- 6 files changed, 27 insertions(+), 11 deletions(-) diff --git a/res/layout-sw400dp/fragment_enter_chat_url.xml b/res/layout-sw400dp/fragment_enter_chat_url.xml index 8b1812b3d3..f3a7d4567f 100644 --- a/res/layout-sw400dp/fragment_enter_chat_url.xml +++ b/res/layout-sw400dp/fragment_enter_chat_url.xml @@ -16,7 +16,7 @@ android:layout_marginLeft="@dimen/large_spacing" android:layout_marginTop="@dimen/large_spacing" android:layout_marginRight="@dimen/large_spacing" - android:hint="https://chat.lokinet.org" /> + android:hint="https://chat.getsession.org" /> + + + android:hint="https://chat.getsession.org" /> - + app:showAsAction="collapseActionView" /> dialog.dismiss()); + alert.create().show(); } private void handleDistributionBroadcastEnabled(MenuItem item) { diff --git a/src/org/thoughtcrime/securesms/loki/redesign/activities/CreateClosedGroupActivity.kt b/src/org/thoughtcrime/securesms/loki/redesign/activities/CreateClosedGroupActivity.kt index 034176745a..f6610df124 100644 --- a/src/org/thoughtcrime/securesms/loki/redesign/activities/CreateClosedGroupActivity.kt +++ b/src/org/thoughtcrime/securesms/loki/redesign/activities/CreateClosedGroupActivity.kt @@ -95,8 +95,11 @@ class CreateClosedGroupActivity : PassphraseRequiredActionBarActivity(), MemberC return Toast.makeText(this, "Please enter a shorter group name", Toast.LENGTH_LONG).show() } val selectedMembers = this.selectedMembers - if (selectedMembers.count() < 1) { - return Toast.makeText(this, "Please pick at least 1 group member", Toast.LENGTH_LONG).show() + if (selectedMembers.count() < 2) { + return Toast.makeText(this, "Please pick at least 2 group members", Toast.LENGTH_LONG).show() + } + if (selectedMembers.count() > 10) { + return Toast.makeText(this, "A closed group cannot have more than 10 members", Toast.LENGTH_LONG).show() } val recipients = selectedMembers.map { Recipient.from(this, Address.fromSerialized(it), false)