Skip to content

Commit 800969a

Browse files
committed
update
1 parent 1fadfdf commit 800969a

File tree

8 files changed

+5
-20
lines changed

8 files changed

+5
-20
lines changed

app/build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import org.jetbrains.kotlin.utils.addToStdlib.butIf
2-
31
@Suppress("DSL_SCOPE_VIOLATION") // TODO: Remove once KTIJ-19369 is fixed
42
plugins {
53
alias(libs.plugins.androidApp)

app/src/androidTest/java/com/wzq/jd/compose/app/ExampleInstrumentedTest.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
package com.wzq.jd.compose.app
22

3-
import androidx.test.platform.app.InstrumentationRegistry
43
import androidx.test.ext.junit.runners.AndroidJUnit4
5-
4+
import androidx.test.platform.app.InstrumentationRegistry
5+
import org.junit.Assert.*
66
import org.junit.Test
77
import org.junit.runner.RunWith
88

9-
import org.junit.Assert.*
10-
119
/**
1210
* Instrumented test, which will execute on an Android device.
1311
*

app/src/main/java/com/wzq/jd/compose/app/data/RemoteDataRepo.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class RemoteDataRepo(private val httpClient: HttpClient, private val baseUrl: St
2323
}
2424

2525
suspend fun getArticleList(pageNum: Int = 0, cid: String? = null) = httpClient.runCatching {
26-
get("${baseUrl}article/list/${pageNum}/json"){
26+
get("${baseUrl}article/list/${pageNum}/json") {
2727
url {
2828
if (!cid.isNullOrEmpty()) {
2929
parameter("cid", cid)

app/src/main/java/com/wzq/jd/compose/app/page/PageState.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ sealed class PageState {
1111
@Suppress("UNCHECKED_CAST")
1212
fun <T> get() = data as? T
1313
}
14+
1415
class Failure(val exception: Throwable? = null, val tag: Any? = null) : PageState()
1516
}

app/src/main/java/com/wzq/jd/compose/app/page/home/HomeCategoryPage.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import androidx.compose.material3.Text
1717
import androidx.compose.runtime.Composable
1818
import androidx.compose.ui.Modifier
1919
import androidx.compose.ui.unit.dp
20-
import com.wzq.jd.compose.app.data.model.ArticleItem
2120
import com.wzq.jd.compose.app.data.model.Categories
2221

2322
/**

app/src/main/java/com/wzq/jd/compose/app/page/search/SearchViewModel.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,9 @@ import androidx.compose.runtime.mutableStateOf
66
import androidx.lifecycle.ViewModel
77
import androidx.lifecycle.viewModelScope
88
import com.wzq.jd.compose.app.data.NetworkUtil
9-
import com.wzq.jd.compose.app.data.model.ArticleItem
109
import com.wzq.jd.compose.app.data.model.SearchHotWords
1110
import com.wzq.jd.compose.app.page.PageState
1211
import kotlinx.coroutines.Dispatchers
13-
import kotlinx.coroutines.async
1412
import kotlinx.coroutines.delay
1513
import kotlinx.coroutines.launch
1614
import kotlinx.coroutines.withContext

app/src/main/res/navigation/test.xml

Lines changed: 0 additions & 8 deletions
This file was deleted.

app/src/test/java/com/wzq/jd/compose/app/ExampleUnitTest.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ import kotlinx.coroutines.delay
66
import kotlinx.coroutines.launch
77
import kotlinx.coroutines.runBlocking
88
import kotlinx.coroutines.withContext
9+
import org.junit.Assert.assertEquals
910
import org.junit.Test
1011

11-
import org.junit.Assert.*
12-
1312
/**
1413
* Example local unit test, which will execute on the development machine (host).
1514
*

0 commit comments

Comments
 (0)