pull/35/head^2
kunfei 5 years ago
parent 186e6c8655
commit d6fc96ca19
  1. 4
      app/src/main/java/io/legado/app/ui/main/rss/RssFragment.kt
  2. 4
      app/src/main/java/io/legado/app/ui/rss/article/RssArticlesActivity.kt

@ -58,7 +58,7 @@ class RssFragment : BaseFragment(R.layout.fragment_rss),
} }
yesButton{ yesButton{
Log.i("RSS","Quick Add URL: ${urlEdit.text}") Log.i("RSS","Quick Add URL: ${urlEdit.text}")
startActivity<RssArticlesActivity>("QuickAddURL" to urlEdit.text.toString().trim()) startActivity<RssArticlesActivity>("url" to urlEdit.text.toString().trim())
} }
}.show() }.show()
} }
@ -79,6 +79,6 @@ class RssFragment : BaseFragment(R.layout.fragment_rss),
} }
override fun openRss(rssSource: RssSource) { override fun openRss(rssSource: RssSource) {
startActivity<RssArticlesActivity>(Pair("url", rssSource.sourceUrl))
} }
} }

@ -21,9 +21,9 @@ import java.net.URL
class RssArticlesActivity : AppCompatActivity() { class RssArticlesActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) { override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState) super.onCreate(savedInstanceState)
if (intent.hasExtra("QuickAddURL")) { if (intent.hasExtra("url")) {
// 处理从 快速添加并预览 跳转到这个页面 // 处理从 快速添加并预览 跳转到这个页面
val urlString = intent.getStringExtra("QuickAddURL") val urlString = intent.getStringExtra("url")
val adapter = ArticleAdapter(mutableListOf<RssArticle>(), this) val adapter = ArticleAdapter(mutableListOf<RssArticle>(), this)
listView { listView {
this.adapter = adapter this.adapter = adapter

Loading…
Cancel
Save