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("格式不对")