New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add leave open group button in conversation #967
base: dev
Are you sure you want to change the base?
Conversation
Whats the status on this? |
we can probably merge this one in, just held off for release because it wasn't tied to any particular current issue so didn't want to introduce anything that might cause an issue if it wasn't necessary |
|
||
val builder = AlertDialog.Builder(this) | ||
.setTitle(R.string.ConversationActivity_leave_group) | ||
.setCancelable(true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cancelable(true)
is the default. delete.
if (threadId == -1L) return@setPositiveButton | ||
val v2OpenGroup = DatabaseComponent.get(this).lokiThreadDatabase().getOpenGroupChat(threadId) ?: return@setPositiveButton | ||
OpenGroupManager.delete(v2OpenGroup.server, v2OpenGroup.room, this) | ||
finish() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could do something like this to remove the return@
s if you want.
DatabaseComponent.get(this).threadDatabase().getThreadIdIfExistsFor(thread)
?.takeIf { it != -1L }
?.let { DatabaseComponent.get(this).lokiThreadDatabase().getOpenGroupChat(it) }
?.apply {
OpenGroupManager.delete(server, room, this)
finish()
}
}
My understanding is that this task needs to be completed as part of post-release chunk 1. We might want to cherrypick this when the time comes, or simply close it and redo it when we start working on that chunk. |
No description provided.