From 1997fe7d3428418921913ff62949c0e33922d29b Mon Sep 17 00:00:00 2001 From: kunfei Date: Tue, 5 Nov 2019 22:27:35 +0800 Subject: [PATCH] up --- .../io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt index 38fb18e98..35ae708bc 100644 --- a/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt +++ b/app/src/main/java/io/legado/app/ui/rss/source/edit/RssSourceEditViewModel.kt @@ -56,7 +56,7 @@ class RssSourceEditViewModel(application: Application) : BaseViewModel(applicati val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager? clipboard?.primaryClip?.let { if (it.itemCount > 0) { - val json = it.getItemAt(0).text.toString() + val json = it.getItemAt(0).text.toString().trim() GSON.fromJsonObject(json)?.let { source -> sourceLiveData.postValue(source) } ?: toast("格式不对")