Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class AppQrLoginViewModel(
logger.info { qrLoginData.url }
runCatching { timer.cancel() }
timer = timeTask(1000, 1000, "check qr login result") {
viewModelScope.launch {
viewModelScope.launch(Dispatchers.IO) {
checkLoginResult()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.derivedStateOf
import androidx.compose.runtime.getValue
import androidx.compose.runtime.remember
import androidx.compose.runtime.withFrameMillis
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.scale
Expand Down Expand Up @@ -69,8 +70,12 @@ fun MaterialShapeQr(
delay(50)
continue
}
state.frameElapsed = System.currentTimeMillis() - state.qrStartTime
delay(16)
withFrameMillis {
state.frameElapsed = System.currentTimeMillis() - state.qrStartTime
}
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.S && state.hasFinalDataImage) {
break
}
}
}

Expand Down