This commit is contained in:
Horis
2023-09-05 22:03:44 +08:00
parent a3b1ac5d89
commit e85c830d2f
3 changed files with 11 additions and 3 deletions
@@ -106,7 +106,7 @@ object RssParserByRule {
rssArticle.pubDate = analyzeRule.getString(rulePubDate) rssArticle.pubDate = analyzeRule.getString(rulePubDate)
Debug.log(sourceUrl, "└${rssArticle.pubDate}", log) Debug.log(sourceUrl, "└${rssArticle.pubDate}", log)
Debug.log(sourceUrl, "┌获取描述", log) Debug.log(sourceUrl, "┌获取描述", log)
if (ruleDescription.isNullOrEmpty()) { if (ruleDescription.isEmpty()) {
rssArticle.description = null rssArticle.description = null
Debug.log(sourceUrl, "└描述规则为空,将会解析内容页", log) Debug.log(sourceUrl, "└描述规则为空,将会解析内容页", log)
} else { } else {
@@ -94,8 +94,15 @@ class BackupConfigFragment : PreferenceFragment(),
} }
private val restoreDoc = registerForActivityResult(HandleFileContract()) { private val restoreDoc = registerForActivityResult(HandleFileContract()) {
it.uri?.let { uri -> it.uri?.let { uri ->
Coroutine.async { waitDialog.setText("恢复中…")
waitDialog.show()
val task = Coroutine.async {
Restore.restore(appCtx, uri) Restore.restore(appCtx, uri)
}.onFinally {
waitDialog.dismiss()
}
waitDialog.setOnCancelListener {
task.cancel()
} }
} }
} }
+2 -1
View File
@@ -19,7 +19,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center_horizontal" android:gravity="center_horizontal"
android:paddingHorizontal="16dp" android:paddingHorizontal="16dp"
android:paddingVertical="8dp" /> android:paddingTop="8dp"
android:paddingBottom="10dp"/>
</androidx.cardview.widget.CardView> </androidx.cardview.widget.CardView>