From 8d35a21d210888cff187674f8c69da96b49495a2 Mon Sep 17 00:00:00 2001 From: ThanhNH Date: Tue, 27 Nov 2018 17:40:26 +0700 Subject: [PATCH] fix code indent --- ncmb_unity/Assets/NCMB/NCMBManager.cs | 41 +++++++++++++-------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/ncmb_unity/Assets/NCMB/NCMBManager.cs b/ncmb_unity/Assets/NCMB/NCMBManager.cs index b3219bcb..92daf497 100644 --- a/ncmb_unity/Assets/NCMB/NCMBManager.cs +++ b/ncmb_unity/Assets/NCMB/NCMBManager.cs @@ -98,7 +98,7 @@ void OnRegistration (string message) Inited = true; //Exceute NCMBDeviceTokenCallbackQueue - if(message != null && message.Length > 0){ + if(message != null && String.Compare(message,"") != 0 ){ NCMBDeviceTokenCallbackQueue.GetInstance().execQueue(null, new NCMBException (new Exception (message))); } else { @@ -257,27 +257,26 @@ internal void onTokenReceived (string token) installation.SaveAsync ((NCMBException saveError) => { //更新実行 if (saveError != null) { //対処可能なエラー - OnRegistration(saveError.ErrorMessage); - if (saveError.ErrorCode.Equals(NCMBException.DUPPLICATION_ERROR)){ - //過去に登録したデバイストークンと衝突。アプリの再インストール後などに発生 - updateExistedInstallation (installation, path); - } else if (saveError.ErrorCode.Equals(NCMBException.DATA_NOT_FOUND)) { - //保存失敗 : 端末情報の該当データがない - installation.ObjectId = null; - installation.SaveAsync((NCMBException updateError) => { - if (updateError != null){ - OnRegistration(updateError.ErrorMessage); - } else { - OnRegistration(""); - } - }); - } else { - //想定外のエラー - OnRegistration (saveError.ErrorMessage); + if (saveError.ErrorCode.Equals(NCMBException.DUPPLICATION_ERROR)){ + //過去に登録したデバイストークンと衝突。アプリの再インストール後などに発生 + updateExistedInstallation (installation, path); + } else if (saveError.ErrorCode.Equals(NCMBException.DATA_NOT_FOUND)) { + //保存失敗 : 端末情報の該当データがない + installation.ObjectId = null; + installation.SaveAsync((NCMBException updateError) => { + if (updateError != null){ + OnRegistration(updateError.ErrorMessage); + } else { + OnRegistration(""); + } + }); + } else { + //想定外のエラー + OnRegistration (saveError.ErrorMessage); + } + } else { + OnRegistration (""); } - } else { - OnRegistration (""); - } }); }