Skip to content

Commit

Permalink
Merge pull request #2800 from planetarium/application_version_view_ex…
Browse files Browse the repository at this point in the history
…ception_handling

fix application version view exception handling
  • Loading branch information
tyrosine1153 authored Jul 19, 2023
2 parents 60fa097 + a2e223b commit 5ccbf31
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
5 changes: 4 additions & 1 deletion nekoyume/Assets/Resources/UI/Prefabs/UI_VersionSystem.prefab
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 1689287913065897726}
m_Father: {fileID: 0}
Expand Down Expand Up @@ -79,6 +80,7 @@ RectTransform:
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3668335696587624744}
m_Father: {fileID: 8915863027991008125}
Expand Down Expand Up @@ -144,6 +146,7 @@ RectTransform:
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1689287913065897726}
m_RootOrder: 0
Expand Down Expand Up @@ -225,7 +228,7 @@ MonoBehaviour:
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_enableWordWrapping: 0
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
Expand Down
16 changes: 14 additions & 2 deletions nekoyume/Assets/_Scripts/UI/Widget/System/VersionSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,23 @@ private void UpdateText()
var hash = _hash.ToString();
hash = hash.Length >= 4 ? hash.Substring(0, 4) : "...";

string versionText = string.Empty;
string commitHashText = string.Empty;
if (!string.IsNullOrEmpty(_clientCommitHash))
{
commitHashText = $"({_clientCommitHash})";
}

#if UNITY_ANDROID || UNITY_IOS
informationText.text = $"APV: {_version} / #{_blockIndex} / Hash: {hash} / ver: {UnityEngine.Application.version}({_clientCommitHash})";
versionText = $"/ Ver: {UnityEngine.Application.version}{commitHashText}";
#else
informationText.text = $"APV: {_version} / #{_blockIndex} / Hash: {hash} / ver: {_clientCommitHash}";
if (!string.IsNullOrEmpty(_clientCommitHash))
{
versionText = $"/ Ver: {commitHashText}";
}
#endif

informationText.text = $"APV: {_version} / #{_blockIndex} / Hash: {hash} {versionText}";
}
}
}

0 comments on commit 5ccbf31

Please sign in to comment.