瀏覽代碼

Bugfix. Sharing images with very long name (#1999)

* Fix sharing with very long images name

* Fix dropLast to take
Pavka 5 年之前
父節點
當前提交
003dca9d45
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt

+ 2 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPresenter.kt

@@ -434,7 +434,8 @@ class ReaderPresenter(
 
         // Build destination file.
         val filename = DiskUtil.buildValidFilename(
-                "${manga.title} - ${chapter.name}") + " - ${page.number}.${type.extension}"
+                "${manga.title} - ${chapter.name}".take(225)
+        ) + " - ${page.number}.${type.extension}"
 
         val destFile = File(directory, filename)
         stream().use { input ->