Skip to content
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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

hjubb
Copy link

@hjubb hjubb commented Sep 13, 2022

No description provided.

@hjubb hjubb requested a review from ceokot September 13, 2022 06:24
@KeeJef
Copy link
Collaborator

KeeJef commented Dec 20, 2022

Whats the status on this?

@hjubb
Copy link
Author

hjubb commented Jan 8, 2023

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

@hjubb hjubb requested a review from bemusementpark May 18, 2023 05:58

val builder = AlertDialog.Builder(this)
.setTitle(R.string.ConversationActivity_leave_group)
.setCancelable(true)
Copy link
Collaborator

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()
Copy link
Collaborator

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()
    }
}

@KeeJef
Copy link
Collaborator

KeeJef commented Mar 27, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants