@@ -11,7 +11,7 @@ import com.intellij.ui.components.JBScrollPane
11
11
import com.intellij.ui.layout.panel
12
12
import com.intellij.ui.table.JBTable
13
13
import com.intellij.util.ui.JBDimension
14
- import com.jiangyy.autogradle.entity.Reponse
14
+ import com.jiangyy.autogradle.entity.ApiResponse
15
15
import com.jiangyy.autogradle.entity.Repository
16
16
import com.jiangyy.autogradle.utils.orDefault
17
17
import okhttp3.*
@@ -33,7 +33,7 @@ import javax.swing.event.DocumentListener
33
33
import javax.swing.text.BadLocationException
34
34
35
35
class EntranceDialog (@Nullable private val event : AnActionEvent ) : DialogWrapper(true ), DocumentListener,
36
- MouseListener , ItemListener {
36
+ MouseListener , ItemListener {
37
37
38
38
private var bindData = mutableListOf<Repository >()
39
39
private var originalData = mutableListOf<Repository >()
@@ -90,9 +90,9 @@ class EntranceDialog(@Nullable private val event: AnActionEvent) : DialogWrapper
90
90
}
91
91
92
92
val keys = arrayOf(
93
- " All" , " Androidx" , " Cache" , " Chart" , " CustomView" , " Debug" , " Dialog" , " Http" ,
94
- " Image" , " Json" , " Kit" , " Log" , " Permission" , " Picker" , " RecyclerView" , " Subscribe" ,
95
- " WebView"
93
+ " All" , " Androidx" , " Cache" , " Chart" , " CustomView" , " Debug" , " Dialog" , " Http" ,
94
+ " Image" , " Json" , " Kit" , " Log" , " Permission" , " Picker" , " RecyclerView" , " Subscribe" ,
95
+ " WebView"
96
96
)
97
97
98
98
comboBox = ComboBox <String >().apply {
@@ -222,7 +222,7 @@ class EntranceDialog(@Nullable private val event: AnActionEvent) : DialogWrapper
222
222
for (i in originalData.indices) {
223
223
val item = originalData[i]
224
224
if (
225
- item.nickname.orEmpty().lowercase().contains(input.orEmpty())
225
+ item.nickname.orEmpty().lowercase().contains(input.orEmpty())
226
226
) {
227
227
bindData.add(originalData[i])
228
228
}
@@ -233,9 +233,9 @@ class EntranceDialog(@Nullable private val event: AnActionEvent) : DialogWrapper
233
233
for (i in originalData.indices) {
234
234
val item = originalData[i]
235
235
if (
236
- item.nickname.orEmpty().lowercase().contains(input.orEmpty())
237
- &&
238
- item.key.orEmpty().lowercase() == key.orEmpty().lowercase()
236
+ item.nickname.orEmpty().lowercase().contains(input.orEmpty())
237
+ &&
238
+ item.key.orEmpty().lowercase() == key.orEmpty().lowercase()
239
239
) {
240
240
bindData.add(originalData[i])
241
241
}
@@ -288,14 +288,14 @@ class EntranceDialog(@Nullable private val event: AnActionEvent) : DialogWrapper
288
288
289
289
private fun listRepos () {
290
290
OkHttpClient ().newCall(
291
- Request .Builder ()
292
- .addHeader(" factory-api-version" , " v2.0" )
293
- .url(" https://plugins.95factory.com/api/autogradle/repository" ).get().build()
291
+ Request .Builder ()
292
+ .addHeader(" factory-api-version" , " v2.0" )
293
+ .url(" https://plugins.95factory.com/api/autogradle/repository" ).get().build()
294
294
).enqueue(object : Callback {
295
295
override fun onFailure (call : Call , e : IOException ) {}
296
296
297
297
override fun onResponse (call : Call , response : Response ) {
298
- Gson ().fromJson<Reponse >(response.body?.string(), Reponse ::class .java)?.let { result ->
298
+ Gson ().fromJson<ApiResponse >(response.body?.string(), ApiResponse ::class .java)?.let { result ->
299
299
originalData = result.data
300
300
bindData.clear()
301
301
bindData.addAll(result.data)
0 commit comments