mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-25 11:05:25 +00:00
Edit menu for groups
This commit is contained in:
parent
841bc69c3c
commit
dc1075e0c7
@ -41,6 +41,7 @@ import org.thoughtcrime.securesms.conversation.v2.utilities.NotificationUtils
|
|||||||
import org.thoughtcrime.securesms.database.Storage
|
import org.thoughtcrime.securesms.database.Storage
|
||||||
import org.thoughtcrime.securesms.dependencies.ConfigFactory
|
import org.thoughtcrime.securesms.dependencies.ConfigFactory
|
||||||
import org.thoughtcrime.securesms.dependencies.DatabaseComponent
|
import org.thoughtcrime.securesms.dependencies.DatabaseComponent
|
||||||
|
import org.thoughtcrime.securesms.groups.EditGroupActivity
|
||||||
import org.thoughtcrime.securesms.groups.EditLegacyGroupActivity
|
import org.thoughtcrime.securesms.groups.EditLegacyGroupActivity
|
||||||
import org.thoughtcrime.securesms.groups.EditLegacyGroupActivity.Companion.groupIDKey
|
import org.thoughtcrime.securesms.groups.EditLegacyGroupActivity.Companion.groupIDKey
|
||||||
import org.thoughtcrime.securesms.permissions.Permissions
|
import org.thoughtcrime.securesms.permissions.Permissions
|
||||||
@ -290,12 +291,19 @@ object ConversationMenuHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun editClosedGroup(context: Context, thread: Recipient) {
|
private fun editClosedGroup(context: Context, thread: Recipient) {
|
||||||
if (!thread.isLegacyClosedGroupRecipient) { return }
|
when {
|
||||||
|
thread.isClosedGroupV2Recipient -> {
|
||||||
|
context.startActivity(EditGroupActivity.createIntent(context, thread.address.serialize()))
|
||||||
|
}
|
||||||
|
|
||||||
|
thread.isLegacyClosedGroupRecipient -> {
|
||||||
val intent = Intent(context, EditLegacyGroupActivity::class.java)
|
val intent = Intent(context, EditLegacyGroupActivity::class.java)
|
||||||
val groupID: String = thread.address.toGroupString()
|
val groupID: String = thread.address.toGroupString()
|
||||||
intent.putExtra(groupIDKey, groupID)
|
intent.putExtra(groupIDKey, groupID)
|
||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun leaveClosedGroup(
|
private fun leaveClosedGroup(
|
||||||
context: Context,
|
context: Context,
|
||||||
|
Loading…
Reference in New Issue
Block a user