Horis 3 лет назад
Родитель
Сommit
ed902c4982

+ 1 - 1
app/src/main/java/io/legado/app/model/rss/RssParserByRule.kt

@@ -106,7 +106,7 @@ object RssParserByRule {
         rssArticle.pubDate = analyzeRule.getString(rulePubDate)
         Debug.log(sourceUrl, "└${rssArticle.pubDate}", log)
         Debug.log(sourceUrl, "┌获取描述", log)
-        if (ruleDescription.isNullOrEmpty()) {
+        if (ruleDescription.isEmpty()) {
             rssArticle.description = null
             Debug.log(sourceUrl, "└描述规则为空,将会解析内容页", log)
         } else {

+ 8 - 1
app/src/main/java/io/legado/app/ui/config/BackupConfigFragment.kt

@@ -94,8 +94,15 @@ class BackupConfigFragment : PreferenceFragment(),
     }
     private val restoreDoc = registerForActivityResult(HandleFileContract()) {
         it.uri?.let { uri ->
-            Coroutine.async {
+            waitDialog.setText("恢复中…")
+            waitDialog.show()
+            val task = Coroutine.async {
                 Restore.restore(appCtx, uri)
+            }.onFinally {
+                waitDialog.dismiss()
+            }
+            waitDialog.setOnCancelListener {
+                task.cancel()
             }
         }
     }

+ 2 - 1
app/src/main/res/layout/view_toast.xml

@@ -19,7 +19,8 @@
             android:layout_height="wrap_content"
             android:gravity="center_horizontal"
             android:paddingHorizontal="16dp"
-            android:paddingVertical="8dp" />
+            android:paddingTop="8dp"
+            android:paddingBottom="10dp"/>
 
     </androidx.cardview.widget.CardView>