Compare commits

..

2 Commits

Author SHA1 Message Date
“虞渠成”
ca042827d6 Merge branch 'master' of https://dev.nextreal.cn/yuqucheng/killapp 2026-08-24 15:06:39 +08:00
“虞渠成”
ba5753a2ef fix(home page): 修复加载弹窗显示时机不正确的问题
调整了加载弹窗的显示和隐藏位置,在初始化开始时显示加载弹窗,初始化完成后隐藏弹窗,优化页面加载体验
2026-08-24 15:06:34 +08:00

View File

@ -822,6 +822,7 @@ namespace Kill.UI.Pages
public async Task Init()
{
LoadingUI.Show();
if (DataManager.Instance.userInfo.device_count == 0)
{
noDevicePage.SetActive(true);
@ -877,14 +878,14 @@ namespace Kill.UI.Pages
Debug.Log("当前选中设备:" + DataManager.Instance.selectedDeviceMac);
}
}
selectDeviceButton.GetComponentInChildren<Text>().text = selectedDevice.device_name;
selectDeviceButton.gameObject.SetActive(true);
hasWifi=await GetDeviceOnlineStatus();
DataManager.Instance.hasWifi=hasWifi;
hasBluetooth = BluetoothManager.Instance.ChangeAimMac(selectedDevice.ble_mac);
DataManager.Instance.hasBluetooth=hasBluetooth;
selectDeviceButton.GetComponentInChildren<Text>().text = selectedDevice.device_name;
selectDeviceButton.gameObject.SetActive(true);
// 先初始化所有 UI 为未连接状态
ResetAllDeviceUI();
@ -928,6 +929,7 @@ namespace Kill.UI.Pages
DataManager.Instance.selectedDevice = selectedDevice;
DataManager.Instance.OwnedDevices=OwnedDevices;
DataManager.Instance.SharedDevices=SharedDevices;
LoadingUI.Hide();
}
/// <summary>