Compare commits
	
		
			3 Commits
		
	
	
		
			v171811317
			...
			v171811321
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					b59c3bcb23 | ||
| 7f554adba5 | |||
| 
						 | 
					21ce061282 | 
@@ -10,8 +10,8 @@ ext {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
def gitVersion() {
 | 
			
		||||
    def process = "git describe --abbrev=0 --tags".execute()
 | 
			
		||||
    return process.text.substring(1).replaceAll("\\.", "").trim()
 | 
			
		||||
    def process = "git for-each-ref refs/tags --sort=-taggerdate --format='%(refname:short)' --count=1".execute()
 | 
			
		||||
    return process.text.replaceAll("'", "").substring(1).replaceAll("\\.", "").trim()
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
def versionCodeFromGit() {
 | 
			
		||||
 
 | 
			
		||||
@@ -179,7 +179,8 @@ class ItemCardAdapter(
 | 
			
		||||
            })
 | 
			
		||||
 | 
			
		||||
            mView.shareBtn.setOnClickListener {
 | 
			
		||||
                c.shareLink(items[adapterPosition].getLinkDecoded())
 | 
			
		||||
                val item = items[adapterPosition]
 | 
			
		||||
                c.shareLink(item.getLinkDecoded(), item.title)
 | 
			
		||||
            }
 | 
			
		||||
 | 
			
		||||
            mView.browserBtn.setOnClickListener {
 | 
			
		||||
 
 | 
			
		||||
@@ -139,7 +139,7 @@ class ArticleFragment : Fragment() {
 | 
			
		||||
                override fun onItemClick(item: MenuItem) {
 | 
			
		||||
                    when (item.itemId) {
 | 
			
		||||
                        R.id.more_action -> getContentFromMercury(customTabsIntent, prefs)
 | 
			
		||||
                        R.id.share_action -> activity!!.shareLink(url)
 | 
			
		||||
                        R.id.share_action -> activity!!.shareLink(url, contentTitle)
 | 
			
		||||
                        R.id.open_action -> activity!!.openItemUrl(
 | 
			
		||||
                            allItems,
 | 
			
		||||
                            pageNumber.toInt(),
 | 
			
		||||
 
 | 
			
		||||
@@ -25,11 +25,12 @@ fun String.toStringUriWithHttp(): String =
 | 
			
		||||
        this
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
fun Context.shareLink(itemUrl: String) {
 | 
			
		||||
fun Context.shareLink(itemUrl: String, itemTitle: String) {
 | 
			
		||||
    val sendIntent = Intent()
 | 
			
		||||
    sendIntent.flags = Intent.FLAG_ACTIVITY_NEW_TASK
 | 
			
		||||
    sendIntent.action = Intent.ACTION_SEND
 | 
			
		||||
    sendIntent.putExtra(Intent.EXTRA_TEXT, itemUrl.toStringUriWithHttp())
 | 
			
		||||
    sendIntent.putExtra(Intent.EXTRA_SUBJECT, itemTitle)
 | 
			
		||||
    sendIntent.type = "text/plain"
 | 
			
		||||
    startActivity(
 | 
			
		||||
        Intent.createChooser(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user