cooperku_kdanmobile пре 6 година
родитељ
комит
93a7f5e8d3
1 измењених фајлова са 3 додато и 3 уклоњено
  1. 3 3
      src/main/java/com/bomostory/sceneeditmodule/SceneEditActivity.kt

+ 3 - 3
src/main/java/com/bomostory/sceneeditmodule/SceneEditActivity.kt

@@ -597,14 +597,14 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
 
     private fun initRecord(){
         var recordPath: String? = null
-        startRecord.setOnClickListener(View.OnClickListener {
+        startRecord.setOnClickListener {
             if (!isRecord) {
                 //  delete record
                 project.story?.let {
                     it.scenes?.let{
-                        it[currentSceneIndex].record = null
                         if (it[currentSceneIndex].recordPath != null)
                             File(it[currentSceneIndex].recordPath).delete()
+                        it[currentSceneIndex].record = null
                     }
                 }
                 recordPath = getRecordFilePath()
@@ -675,7 +675,7 @@ class SceneEditActivity : AppCompatActivity(), ActorAdapter.OnActorDragListener,
                 initControlSceneView()
                 initRecordFinishView()
             }
-        })
+        }
     }
 
     private fun initRecordFinishView(){