1
0
Fork 0
mirror of https://github.com/KokaKiwi/BarInsta synced 2026-03-05 12:01:35 +00:00

Allow ending a group chat

This commit is contained in:
Ammar Githam 2021-01-20 02:24:49 +09:00
parent ba526eb0bb
commit 6aee7ea863
14 changed files with 176 additions and 158 deletions

View file

@ -146,9 +146,26 @@
android:text="@string/dms_action_leave"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="@color/red_600"
app:layout_constraintBottom_toTopOf="@id/pending_members_header"
app:layout_constraintBottom_toTopOf="@id/end"
app:layout_constraintTop_toBottomOf="@id/approval_required" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/end"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:background="?selectableItemBackground"
android:gravity="center_vertical"
android:paddingStart="16dp"
android:paddingTop="12dp"
android:paddingEnd="16dp"
android:paddingBottom="12dp"
android:text="@string/dms_action_end"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="@color/red_600"
app:layout_constraintBottom_toTopOf="@id/pending_members_header"
app:layout_constraintTop_toBottomOf="@id/leave" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/pending_members_header"
android:layout_width="wrap_content"
@ -163,7 +180,7 @@
android:textStyle="bold"
app:layout_constraintBottom_toTopOf="@id/pending_members"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/leave" />
app:layout_constraintTop_toBottomOf="@id/end" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/pending_members_admin_only"
@ -216,7 +233,7 @@
android:id="@+id/group_settings"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="title_edit_input_layout, mute_mentions_label, mute_mentions, leave, add_members, approval_required, approval_required_label" />
app:constraint_referenced_ids="title_edit_input_layout, mute_mentions_label, mute_mentions, leave, end, add_members, approval_required, approval_required_label" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>

View file

@ -27,7 +27,7 @@
app:layout_constraintEnd_toEndOf="@id/input_bg"
app:layout_constraintStart_toStartOf="@id/input_bg"
app:layout_constraintTop_toTopOf="@id/reply_info"
tools:visibility="visible" />
tools:visibility="gone" />
<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/reply_info"
@ -46,7 +46,7 @@
app:layout_constraintStart_toStartOf="@id/input_bg"
app:layout_constraintTop_toBottomOf="@id/chats"
tools:text="Replying to yourself"
tools:visibility="visible" />
tools:visibility="gone" />
<androidx.emoji.widget.EmojiAppCompatTextView
android:id="@+id/reply_preview_text"
@ -66,7 +66,7 @@
app:layout_constraintTop_toBottomOf="@id/reply_info"
app:layout_goneMarginTop="8dp"
tools:text="Post"
tools:visibility="visible" />
tools:visibility="gone" />
<com.facebook.drawee.view.SimpleDraweeView
android:id="@+id/reply_preview_image"
@ -80,7 +80,7 @@
app:layout_constraintStart_toEndOf="@id/reply_preview_text"
app:layout_constraintTop_toTopOf="@id/reply_info"
tools:background="@mipmap/ic_launcher"
tools:visibility="visible" />
tools:visibility="gone" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/reply_cancel"
@ -93,7 +93,7 @@
app:layout_constraintStart_toEndOf="@id/reply_preview_image"
app:layout_constraintTop_toTopOf="@id/reply_info"
app:srcCompat="@drawable/ic_close_24"
tools:visibility="visible" />
tools:visibility="gone" />
<!--<androidx.constraintlayout.widget.Group-->
<!-- android:id="@+id/reply_group"-->

View file

@ -43,6 +43,7 @@
<dimen name="reaction_picker_emoji_margin">8dp</dimen>
<dimen name="reaction_picker_option_height">48dp</dimen>
<dimen name="reaction_picker_add_padding_adjustment">4dp</dimen>
<dimen name="dm_item_context_min_width">200dp</dimen>
<dimen name="horizontal_divider_height">1dp</dimen>
</resources>

View file

@ -415,4 +415,7 @@
<string name="added_by">Added by %s</string>
<string name="admin_approval_required">Admin approval required</string>
<string name="admin_approval_required_description">An admin approval will be required to add new members to the group</string>
<string name="dms_action_end">End chat</string>
<string name="dms_action_end_question">End chat?</string>
<string name="dms_action_end_description">All members will be removed from the group. They will still be able to view the chat history.</string>
</resources>