This repository was archived by the owner on Dec 5, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
src/UnityExtension/Assets/Editor/GitHub.Unity/UI Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,15 @@ class AuthenticationView : Subview
21
21
private const string TwofaButton = "Verify" ;
22
22
23
23
[ SerializeField ] private Vector2 scroll ;
24
- [ SerializeField ] private string username = "" ;
25
- [ SerializeField ] private string two2fa = "" ;
24
+ [ SerializeField ] private string username = string . Empty ;
25
+ [ SerializeField ] private string two2fa = string . Empty ;
26
26
[ SerializeField ] private string message ;
27
27
28
28
[ NonSerialized ] private bool need2fa ;
29
29
[ NonSerialized ] private bool isBusy ;
30
30
[ NonSerialized ] private string errorMessage ;
31
31
[ NonSerialized ] private bool enterPressed ;
32
- [ NonSerialized ] private string password = "" ;
32
+ [ NonSerialized ] private string password = string . Empty ;
33
33
[ NonSerialized ] private AuthenticationService authenticationService ;
34
34
35
35
@@ -104,11 +104,21 @@ public void SetMessage(string value)
104
104
message = value ;
105
105
}
106
106
107
+ public void ClearMessage ( )
108
+ {
109
+ message = null ;
110
+ }
111
+
107
112
public void SetUsername ( string value )
108
113
{
109
114
username = value ;
110
115
}
111
116
117
+ public void ClearUsername ( )
118
+ {
119
+ username = string . Empty ;
120
+ }
121
+
112
122
private void HandleEnterPressed ( )
113
123
{
114
124
if ( Event . current . type != EventType . KeyDown )
Original file line number Diff line number Diff line change @@ -83,6 +83,9 @@ private void Open(PopupViewType popupViewType, Action<bool> onClose)
83
83
}
84
84
85
85
OpenInternal ( PopupViewType . AuthenticationView , completedAuthentication => {
86
+ authenticationView . ClearMessage ( ) ;
87
+ authenticationView . ClearUsername ( ) ;
88
+
86
89
if ( completedAuthentication )
87
90
{
88
91
Logger . Trace ( "User completed validation opening view: {0}" , popupViewType . ToString ( ) ) ;
You can’t perform that action at this time.
0 commit comments