Commits

Devin Martin  committed 19d3473

Clear out the codes and times so they get refreshed. Call ShowCodes rather than just Show.

  • Participants
  • Parent commits f27932c

Comments (0)

Files changed (1)

File ShowOneTimePasswords.cs

 
         private void ShowCode()
         {
+            this.lastCode = 0;
+            this.lastRemainingTime = 0;
+
             this.totp = new Totp(this.data.Key, step: this.data.Step, totpSize: this.data.Size);
             this.timerUpdateTotp.Enabled = true;
         }
                 // indicate that a change was made, must save
                 host.MainWindow.UpdateUI(false, null, true, host.Database.RootGroup, true, null, true);
 
-                this.Show();
+                this.ShowCode();
             }
+            else if (this.data == null)
+                this.Close();
             else
-                this.Close();
+                this.ShowCode();
         }
     }
 }