chore(m2): 保存功能验收及后续清理前检查点

This commit is contained in:
Liubing\LB
2026-10-10 20:40:27 +08:00
parent d3c5394a55
commit 144e7f739f
110 changed files with 12672 additions and 7514 deletions

View File

@@ -7,48 +7,30 @@ public class SettingNotificationsPopupPanel : MonoBehaviour
{
public Button btn_ok;
public Button btn_cancel;
ILocalNotificationService notifications;
bool handling;
bool completed;
private ILocalNotificationService notifications;
private void Start()
{
notifications = GContext.container.Resolve<ILocalNotificationService>();
btn_ok.onClick.AddListener(OnBtnOk);
btn_cancel.onClick.AddListener(DestroyUI);
}
private async void OnBtnOk()
private void OnBtnOk()
{
if (this == null || handling || completed) return;
handling = true;
try
if (this == null)
{
if (notifications is LocalNotificationService local && local.HasKVPromptOwner)
{
local.RequirePromptOwner();
await local.OpenSettingsAsync();
if (this == null) return;
local.RequirePromptOwner();
}
else
{
DestroyUI();
notifications.OpenSettings();
return;
}
DestroyUI();
return;
}
catch (System.Exception ex) { game.DefaultSettingService.LogPromptFailure(ex); }
finally { handling = false; }
(notifications as LocalNotificationService)?.RequirePromptOwner();
DestroyUI();
notifications.OpenSettings();
}
void DestroyUI()
{
if (this == null || completed) return;
try
if (this == null)
{
(notifications as LocalNotificationService)?.RequirePromptOwner();
completed = true;
UIManager.Instance.DestroyUI(gameObject.name);
return;
}
catch (System.Exception ex) { game.DefaultSettingService.LogPromptFailure(ex); }
(notifications as LocalNotificationService)?.RequirePromptOwner();
UIManager.Instance.DestroyUI(gameObject.name);
}
}