mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-14 08:15:04 +01:00
add button to start group chat in Conversation Info
no action for now Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
c9136cdf15
commit
dcd4fa5257
@ -207,6 +207,7 @@ class ConversationInfoActivity :
|
|||||||
binding.leaveConversationAction.setOnClickListener { leaveConversation() }
|
binding.leaveConversationAction.setOnClickListener { leaveConversation() }
|
||||||
binding.clearConversationHistory.setOnClickListener { showClearHistoryDialog() }
|
binding.clearConversationHistory.setOnClickListener { showClearHistoryDialog() }
|
||||||
binding.addParticipantsAction.setOnClickListener { selectParticipantsToAdd() }
|
binding.addParticipantsAction.setOnClickListener { selectParticipantsToAdd() }
|
||||||
|
binding.startGroupChat.setOnClickListener { startGroupChat() }
|
||||||
binding.listBansButton.setOnClickListener { listBans() }
|
binding.listBansButton.setOnClickListener { listBans() }
|
||||||
|
|
||||||
viewModel.getRoom(conversationUser, conversationToken)
|
viewModel.getRoom(conversationUser, conversationToken)
|
||||||
@ -672,6 +673,10 @@ class ConversationInfoActivity :
|
|||||||
.commit()
|
.commit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun startGroupChat() {
|
||||||
|
Snackbar.make(binding.root, "TODO: start group chat...", Snackbar.LENGTH_LONG).show()
|
||||||
|
}
|
||||||
|
|
||||||
private fun executeIfResultOk(result: ActivityResult, onResult: (intent: Intent?) -> Unit) {
|
private fun executeIfResultOk(result: ActivityResult, onResult: (intent: Intent?) -> Unit) {
|
||||||
if (result.resultCode == Activity.RESULT_OK) {
|
if (result.resultCode == Activity.RESULT_OK) {
|
||||||
onResult(result.data)
|
onResult(result.data)
|
||||||
@ -865,7 +870,10 @@ class ConversationInfoActivity :
|
|||||||
binding.sharedItems.visibility = GONE
|
binding.sharedItems.visibility = GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ConversationUtils.canModerate(conversationCopy, spreedCapabilities)) {
|
if (conversation!!.type == ConversationEnums.ConversationType.ROOM_TYPE_ONE_TO_ONE_CALL) {
|
||||||
|
binding.addParticipantsAction.visibility = GONE
|
||||||
|
binding.startGroupChat.visibility = VISIBLE
|
||||||
|
} else if (ConversationUtils.canModerate(conversationCopy, spreedCapabilities)) {
|
||||||
binding.addParticipantsAction.visibility = VISIBLE
|
binding.addParticipantsAction.visibility = VISIBLE
|
||||||
if (hasSpreedFeatureCapability(
|
if (hasSpreedFeatureCapability(
|
||||||
spreedCapabilities,
|
spreedCapabilities,
|
||||||
|
@ -392,6 +392,34 @@
|
|||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:id="@+id/startGroupChat"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="@dimen/standard_quarter_margin"
|
||||||
|
android:background="?android:attr/selectableItemBackground"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:padding="@dimen/standard_padding"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:visibility="visible">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="24dp"
|
||||||
|
android:layout_height="40dp"
|
||||||
|
android:layout_marginEnd="@dimen/standard_margin"
|
||||||
|
android:contentDescription="@null"
|
||||||
|
android:src="@drawable/ic_people_group_black_24px"
|
||||||
|
app:tint="@color/grey_600" />
|
||||||
|
|
||||||
|
<com.google.android.material.textview.MaterialTextView
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:gravity="center_vertical"
|
||||||
|
android:text="@string/nc_start_group_chat"
|
||||||
|
android:textSize="@dimen/two_line_primary_text_size" />
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
<androidx.recyclerview.widget.RecyclerView
|
<androidx.recyclerview.widget.RecyclerView
|
||||||
android:id="@+id/recycler_view"
|
android:id="@+id/recycler_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
|
Loading…
Reference in New Issue
Block a user