@@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
1313import androidx.compose.foundation.layout.offset
1414import androidx.compose.foundation.layout.padding
1515import androidx.compose.material.icons.Icons
16+ import androidx.compose.material.icons.filled.DownloadDone
1617import androidx.compose.material.icons.filled.Pause
1718import androidx.compose.material.icons.filled.PlayArrow
1819import androidx.compose.material3.Card
@@ -165,18 +166,18 @@ fun DownloadCard(
165166 }
166167Spacer (modifier= Modifier .weight(1f ))
167168val running= downloadState== DownloadInfo .STATE_WAIT || downloadState== DownloadInfo .STATE_DOWNLOAD
168- val icon= remember {
169- movableContentOf< Boolean > {
170- Icon (imageVector = if (it) Icons . Default . Pause else Icons .Default .PlayArrow , contentDescription = null )
171- }
169+ val icon= when (downloadState) {
170+ DownloadInfo . STATE_WAIT , DownloadInfo . STATE_DOWNLOAD -> Icons . Default . Pause
171+ DownloadInfo . STATE_FINISH -> Icons .Default .DownloadDone
172+ else -> Icons . Default . PlayArrow
172173 }
173174if (selectMode) {
174175Box (modifier= Modifier .offset(4 .dp).minimumInteractiveComponentSize()) {
175- icon(running )
176+ Icon (imageVector = icon, contentDescription = null )
176177 }
177178 }else {
178179IconButton (onClick= if (running) onStopelse onStart, shapes= IconButtonDefaults .shapes(), modifier= Modifier .offset(4 .dp)) {
179- icon(running )
180+ Icon (imageVector = icon, contentDescription = null )
180181 }
181182 }
182183 }