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,11 +291,18 @@ object ConversationMenuHelper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun editClosedGroup(context: Context, thread: Recipient) {
|
private fun editClosedGroup(context: Context, thread: Recipient) {
|
||||||
if (!thread.isLegacyClosedGroupRecipient) { return }
|
when {
|
||||||
val intent = Intent(context, EditLegacyGroupActivity::class.java)
|
thread.isClosedGroupV2Recipient -> {
|
||||||
val groupID: String = thread.address.toGroupString()
|
context.startActivity(EditGroupActivity.createIntent(context, thread.address.serialize()))
|
||||||
intent.putExtra(groupIDKey, groupID)
|
}
|
||||||
context.startActivity(intent)
|
|
||||||
|
thread.isLegacyClosedGroupRecipient -> {
|
||||||
|
val intent = Intent(context, EditLegacyGroupActivity::class.java)
|
||||||
|
val groupID: String = thread.address.toGroupString()
|
||||||
|
intent.putExtra(groupIDKey, groupID)
|
||||||
|
context.startActivity(intent)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun leaveClosedGroup(
|
private fun leaveClosedGroup(
|
||||||
|
Loading…
Reference in New Issue
Block a user