-
-
Notifications
You must be signed in to change notification settings - Fork 86
Display Welcome to Beta once per revision #1203
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
System.err.println("MOON DEBUG" + | ||
Base.getRevision() + ", and lastBetaSeen is " + | ||
lastBetaSeen + "."); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will remove this, i suppose
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep, feel free to use Messages.log
that will be hidden for users and will give us valuable information when looking at the logs
@@ -61,7 +62,10 @@ class WelcomeToBeta { | |||
val mac = SystemInfo.isMacFullWindowContentSupported | |||
SwingUtilities.invokeLater { | |||
JFrame(windowTitle).apply { | |||
val close = { dispose() } | |||
val close = { | |||
Preferences.set("beta.last_beta_welcome_seen", getRevision().toString()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i need a better key name. wondering your thoughts. should it be update.beta_welcome
or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update.beta_prompt
if(latest < Base.getRevision()){ | ||
WelcomeToBeta.showWelcomeToBeta(); | ||
|
||
String lastBetaSeenStr = Preferences.get("beta.last_beta_welcome_seen"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would say using Preferences.getInteger()
would be a better choice here, to make sure it is never empty you can add the key to the defaults.txt
in build/shared/lib/defaults.txt
@all-contributors please add @catilac for code |
I've put up a pull request to add @catilac! 🎉 |
Limits the Welcome to Beta screen to once per downloaded revision.
Closes #1198