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 connect on matrix #1206

Merged
merged 6 commits into from
Aug 31, 2023
Merged

Add connect on matrix #1206

merged 6 commits into from
Aug 31, 2023

Conversation

MV-GH
Copy link
Collaborator

@MV-GH MV-GH commented Aug 31, 2023

Add connect on matrix feature, this will open the relevant matrix client with the option to dm this user.

I designed the SVG icon of Matrix myself. So hereby I release the icon into the public domain

matrix_icon

Edit:
Someone linked me a smaller icon, I am using that one now.

image

@@ -278,6 +289,7 @@ fun PersonProfileMoreDropdown(
onBlockPersonClick: () -> Unit,
onReportPersonClick: () -> Unit,
onMessagePersonClick: () -> Unit,
openMatrix: (() -> Unit)?,
Copy link
Member

@dessalines dessalines Aug 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hrm.... not a fan of optional params, as they often result in places you don't catch them. Probably best would be

hasMatrixId: Boolean,
onOpenMatrixClick: () -> Unit

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optional params have indeed been a footgun but this param is not optional. You are forced to pass null or a lambda. Not doing will result in a compile error. That would not be the case if I did openMatrix: (() -> Unit)? = null

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mmmk cool.

app/src/main/res/values/strings.xml Show resolved Hide resolved
@dessalines dessalines merged commit 7a90523 into LemmyNet:main Aug 31, 2023
@MV-GH MV-GH deleted the feat/matrix_connect branch August 31, 2023 20:38
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.

2 participants