瀏覽代碼

Rename argument

Wayne Huang 4 年之前
父節點
當前提交
164c67df7e
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/main/java/com/kdanmobile/reader/additionalpage/AdditionalPageConverter.kt

+ 2 - 2
src/main/java/com/kdanmobile/reader/additionalpage/AdditionalPageConverter.kt

@@ -60,8 +60,8 @@ class AdditionalPageConverter(
     /**
      * 頁碼轉換,計算第pageIndex頁刪除額外頁面後是原始文件的第幾頁
      */
-    fun convertToRawPageIndex(pageIndex: Int, force: Boolean = false): Int {
-        if (!force && !shouldApplyAdditionalPage()) return pageIndex
+    fun convertToRawPageIndex(pageIndex: Int, forceIncludeAdditionalPage: Boolean = false): Int {
+        if (!forceIncludeAdditionalPage && !shouldApplyAdditionalPage()) return pageIndex
         if (pageIndex < firstAdditionalPageIndex) return pageIndex
         return (pageIndex * additionalPageInterval + firstAdditionalPageIndex) / (additionalPageInterval + 1)
     }