Przeglądaj źródła

Merge branch 'choose-front-cover-scene'

Wayne 6 lat temu
rodzic
commit
b9eb107273

+ 7 - 0
src/main/java/com/bomostory/sceneeditmodule/utils/Utils.kt

@@ -9,6 +9,13 @@ import com.example.tfat.myapplication.R
 import java.io.File
 
 object Utils {
+
+    fun generateSceneName(index: Int): String {
+        val book = ('A'.toInt() + ((index + 1) / 22)).toChar()
+        val num = (index + 1) % 22
+        return "$book$num"
+    }
+
     fun showExportPdfCompleteThenViewDialog(context: Context, authority: String, file: File) {
         AlertDialog.Builder(context)
                 .setMessage(R.string.export_pdf_complete_dialog_msg)