-
Notifications
You must be signed in to change notification settings - Fork 782
Allow sharing text mimetype content via android's share menu #6296
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
Conversation
@@ -214,7 +214,7 @@ class AttachmentsHelper(val context: Context, val callback: Callback) : Restorab | |||
it.toContentAttachmentData() | |||
} | |||
) | |||
} else if (type.startsWith("application") || type.startsWith("file") || type.startsWith("*")) { | |||
} else if (type.startsWith("application") || type.startsWith("file") || type.startsWith("text") || type.startsWith("*")) { |
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.
do we want to explicitly handle all the possible cases? or should our else case allow handling any type as a file?
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.
For me i prefer to explicitly handle all the possible cases to keep the control of what we send. It's easy to add a new type if a user need it.
Kudos, SonarCloud Quality Gate passed! |
@@ -214,7 +214,7 @@ class AttachmentsHelper(val context: Context, val callback: Callback) : Restorab | |||
it.toContentAttachmentData() | |||
} | |||
) | |||
} else if (type.startsWith("application") || type.startsWith("file") || type.startsWith("*")) { | |||
} else if (type.startsWith("application") || type.startsWith("file") || type.startsWith("text") || type.startsWith("*")) { |
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.
For me i prefer to explicitly handle all the possible cases to keep the control of what we send. It's easy to add a new type if a user need it.
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.
LGTM
Type of change
Content
Allows
text/*
content types to be shared via android share menu as file attachments.Motivation and context
Fixes #6285
Screenshots / GIFs
Tests
Tested devices