关联用户列表优化
This commit is contained in:
@@ -181,16 +181,19 @@ class LinkedUserActivity : AppCompatActivity() {
|
||||
binding.swipeRefresh.isRefreshing = true
|
||||
lifecycleScope.launch {
|
||||
try {
|
||||
val deviceId = DeviceIdEvent.getDeviceId()
|
||||
if (deviceId.isNullOrEmpty()) {
|
||||
Toast.makeText(this@LinkedUserActivity, "设备 ID 为空", Toast.LENGTH_SHORT).show()
|
||||
withContext(Dispatchers.Main) {
|
||||
binding.swipeRefresh.isRefreshing = false
|
||||
var deviceId: String? = null
|
||||
if (mode == MODE_SETTINGS) {
|
||||
deviceId = DeviceIdEvent.getDeviceId()
|
||||
if (deviceId.isNullOrEmpty()) {
|
||||
Toast.makeText(this@LinkedUserActivity, "设备 ID 为空", Toast.LENGTH_SHORT).show()
|
||||
withContext(Dispatchers.Main) {
|
||||
binding.swipeRefresh.isRefreshing = false
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
return@launch
|
||||
}
|
||||
val response = if (mode == MODE_SETTINGS) {
|
||||
RetrofitNetwork.getNetworkService().getDeviceUserList(deviceId)
|
||||
RetrofitNetwork.getNetworkService().getDeviceUserList(deviceId!!)
|
||||
} else {
|
||||
RetrofitNetwork.getNetworkService().getFamilyMembers()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user