Skip to content

Commit 511dd3a

Browse files
committed
Display once per revision number
1 parent 3f36db5 commit 511dd3a

File tree

3 files changed

+22
-5
lines changed

3 files changed

+22
-5
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,6 @@ tasks.register<Copy>("renameWindres") {
424424
}
425425
tasks.register("includeProcessingResources"){
426426
dependsOn(
427-
"includeJdk",
428427
"includeCore",
429428
"includeJavaMode",
430429
"includeSharedAssets",
@@ -433,6 +432,7 @@ tasks.register("includeProcessingResources"){
433432
"includeJavaModeResources",
434433
"renameWindres"
435434
)
435+
mustRunAfter("includeJdk")
436436
finalizedBy("signResources")
437437
}
438438

@@ -539,6 +539,7 @@ afterEvaluate {
539539
dependsOn("includeProcessingResources")
540540
}
541541
tasks.named("createDistributable").configure {
542+
dependsOn("includeJdk")
542543
finalizedBy("setExecutablePermissions")
543544
}
544545
}

app/src/processing/app/UpdateCheck.java

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import processing.core.PApplet;
3636

3737

38+
3839
/**
3940
* Threaded class to check for updates in the background.
4041
* <p/>
@@ -125,7 +126,6 @@ public void updateCheck() throws IOException {
125126
Preferences.set("update.last", String.valueOf(now));
126127

127128
if (base.activeEditor != null) {
128-
// boolean offerToUpdateContributions = true;
129129

130130
if (latest > Base.getRevision()) {
131131
System.out.println("You are running Processing revision 0" +
@@ -135,8 +135,20 @@ public void updateCheck() throws IOException {
135135
// offerToUpdateContributions = !promptToVisitDownloadPage();
136136
promptToVisitDownloadPage();
137137
}
138-
if(latest < Base.getRevision()){
139-
WelcomeToBeta.showWelcomeToBeta();
138+
139+
String lastBetaSeenStr = Preferences.get("beta.last_beta_welcome_seen");
140+
int lastBetaSeen = 0;
141+
if (lastBetaSeenStr != null) {
142+
lastBetaSeen = Integer.parseInt(lastBetaSeenStr);
143+
}
144+
int revision = Base.getRevision();
145+
System.err.println("MOON DEBUG" +
146+
Base.getRevision() + ", and lastBetaSeen is " +
147+
lastBetaSeen + ".");
148+
149+
150+
if(latest < revision && revision != lastBetaSeen ) {
151+
WelcomeToBeta.showWelcomeToBeta();
140152
}
141153

142154
/*

app/src/processing/app/ui/WelcomeToBeta.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import com.mikepenz.markdown.m2.markdownColor
3535
import com.mikepenz.markdown.m2.markdownTypography
3636
import com.mikepenz.markdown.model.MarkdownColors
3737
import com.mikepenz.markdown.model.MarkdownTypography
38+
import processing.app.Preferences
3839
import processing.app.Base.getRevision
3940
import processing.app.Base.getVersionName
4041
import processing.app.ui.theme.LocalLocale
@@ -61,7 +62,10 @@ class WelcomeToBeta {
6162
val mac = SystemInfo.isMacFullWindowContentSupported
6263
SwingUtilities.invokeLater {
6364
JFrame(windowTitle).apply {
64-
val close = { dispose() }
65+
val close = {
66+
Preferences.set("beta.last_beta_welcome_seen", getRevision().toString())
67+
dispose()
68+
}
6569
rootPane.putClientProperty("apple.awt.transparentTitleBar", mac)
6670
rootPane.putClientProperty("apple.awt.fullWindowContent", mac)
6771
defaultCloseOperation = JFrame.DISPOSE_ON_CLOSE

0 commit comments

Comments
 (0)