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

Sharing options #1854

Open
wants to merge 3 commits into
base: dev
Choose a base branch
from
Open

Sharing options #1854

wants to merge 3 commits into from

Conversation

Sjmarf
Copy link
Member

@Sjmarf Sjmarf commented Mar 11, 2025

Note

Relies on this MlemMiddleware PR.

Closes #639, closes #1395.

Settings -> Links -> Share Links

The default behavior is now to share from the user's instance rather than the author's instance as it was before.

@Sjmarf Sjmarf requested a review from a team as a code owner March 11, 2025 20:06
@Sjmarf Sjmarf requested review from EricBAndrews and removed request for a team March 11, 2025 20:06
@Sjmarf Sjmarf changed the title Sjmarf/share Sharing options Mar 11, 2025
Copy link
Member

@EricBAndrews EricBAndrews left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

A couple nits, nothing blocking.

Comment on lines +62 to +63
"branch" : "sjmarf/sharing",
"revision" : "edfba5745c5ddbcd0137afd24687db85e168a32e"
Copy link
Member

Choose a reason for hiding this comment

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

Reminder

Comment on lines +98 to +111
do {
print("START")
let client = ApiClient.getApiClient(url: url, username: nil)
let resolvedEntity = try await client.resolve(url: entity.actorId.url)
NavigationModel.main.shareInfo = .init(
url: resolvedEntity.url(),
actions: entity.shareSheetActions()
)
ToastModel.main.removeToast(id: toastId)
print("END")
} catch {
print("ERROR", error)
ToastModel.main.removeToast(id: toastId)
handleError(error)
Copy link
Member

Choose a reason for hiding this comment

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

nit

Debug prints?

Section("Share links using...") {
Picker("Share links using...", selection: $linkSharingMode) {
ForEach(LinkSharingMode.allCases, id: \.self) { mode in
Text(mode.label)
Copy link
Member

Choose a reason for hiding this comment

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

nit

These should have conditional icons--"house," "signature," "questionmark.circle"?

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.

Share URL should share from user's instance Advanced sharing options
2 participants