"Smart" URL sharing?
I commonly share links to add tasks to Todoist. When a task it's added in a certain format - "linkurl (title here)" - it generates a linkified task in Todoist.
Chrome, Firefox Focus, and some other apps (but not all apps) appear to share in such a way that the Todoist Share target automatically generates such a formatted task.
It would be nice if this app also did so. Device: Huawei Nexus 6P, SDK: 27, app version: 76
Oh. It's even weirder. It added the task with duplicated title text. I suspect that part is the fault of the Todoist share integration, though. Copy->paste worked perfectly fine.
Example:

If you'll accept PRs on this topic, I'll try to find some time to look into this.
#1074 related (also by me)
#1059 looks related
It depends on how the receiving app interpret the share intent. I put the title and URL into different fields: subject (optional field) and text. Since there is no convention on how to interpret a share intent, some apps read from both fields and use it for different things (e.g. email app, Google Keep), some apps read from both fields and combine it, some just simply read from the text field.
Changing it one way or another is gonna affect the user experience anyway, so I was just thinking it maybe easier to share more information and let user remove the unwanted part, than having them going back and forth to copy the missing information.
Nevertheless, I think we could make a setting for this, to allow users to select the default share behavior (with title or without title), also a setting for sharing comment with text or link.
I think copying the URL is the more common intention when one selects "share" for a comment (via overflow menu). For sharing the comment text I'd personally be double-tapping or long-pressing the text itself and sharing/copying from that.
I took a quick look in the repository; for sharing, AppUtils.share is used.
The actual place in the app's logic where comment is shared is here. What happens as I understand is isStoryType evaluates for false for a comment, hence subject ends up with null.
Simplest fix would be using something like:
item.isStoryType() ? item.getDisplayedTitle() : item.getUrl(),
I haven't tried yet, but getUrl should work for a comment judring by a test here
Also here's a test specifically for comment sharing.
@hidroh I've seen there hasn't been much activity lately, so you must be quite busy; let me know if you will accept my PR though, I'll make sure to test it and make it easy for you to review.
Also thanks for an the app, and especially all these tests. It's very rare when you can figure out how app works without ever opening an IDE, awesome work!