xiongzhu 10 mesi fa
parent
commit
863b06833d

+ 1 - 1
app/build.gradle

@@ -24,7 +24,7 @@ android {
         applicationId "com.example.modifier"
         minSdk 31
         targetSdk 34
-        versionCode 175
+        versionCode 176
         versionName "1.0.1"
         archivesBaseName = "${applicationId}-${versionCode}"
 

+ 2 - 2
app/src/main/java/com/example/modifier/model/TaskExecutionResult.kt

@@ -6,7 +6,7 @@ import kotlinx.serialization.Serializable
 data class TaskExecutionResult(
     val id: Int,
     var messageId: String? = null,
-    var sent: Int = 0,
-    var delivery: Int = 0,
+    var sent: Int,
+    var delivery: Int,
     var numberId: Int? = null,
 )

+ 7 - 0
app/src/main/java/com/example/modifier/service/SocketClient.kt

@@ -306,6 +306,13 @@ class SocketClient(
     }
 
     private fun socketCallback(id: String, data: List<TaskExecutionResult>) {
+        Log.i(TAG, "socketCallback: ${Json.encodeToString(
+            SocketCallback(
+                id = id,
+                status = 0,
+                data = data
+            )
+        )}")
         runCatching {
             mSocket.emit(
                 "callback", JSONObject(

+ 5 - 2
app/src/main/java/com/example/modifier/service/TaskRunner.kt

@@ -277,7 +277,9 @@ class TaskRunner(
                 tasks.removeAt(0)
                 val result = TaskExecutionResult(
                     id = taskItem.id,
-                    numberId = spoofedInfoRepo.spoofedInfo.value.numberId
+                    numberId = spoofedInfoRepo.spoofedInfo.value.numberId,
+                    sent = 0,
+                    delivery = 0
                 )
                 results.add(result)
                 try {
@@ -300,7 +302,8 @@ class TaskRunner(
                 results.add(
                     TaskExecutionResult(
                         id = taskItem.id,
-                        sent = 2
+                        sent = 2,
+                        delivery = 0
                     )
                 )
             }