Skip to content

Commit

Permalink
Changed URL updating to use a hash instead, as it looking a bit visua…
Browse files Browse the repository at this point in the history
…lly cleaner.
  • Loading branch information
lanceewing committed Mar 26, 2024
1 parent cc94089 commit ab36966
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions html/src/main/java/com/agifans/agile/gwt/GwtAgileRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public GwtAgileRunner(UserInput userInput, WavePlayer wavePlayer, SavedGameStore

@Override
public void start(AppConfigItem appConfigItem) {
String newURL = Window.Location.createUrlBuilder().setParameter("id", appConfigItem.getGameId().toLowerCase()).buildString();
String newURL = Window.Location.createUrlBuilder().setHash("/id/" + appConfigItem.getGameId().toLowerCase()).buildString();
updateURLWithoutReloading(newURL);

// The game data files have been stored/cached in the OPFS. We load it from
Expand Down Expand Up @@ -276,8 +276,7 @@ public void reset() {
worker = null;

String newURL = Window.Location.createUrlBuilder()
.removeParameter("id")
.removeParameter("path")
.setHash(null)
.buildString();
updateURLWithoutReloading(newURL);
}
Expand Down

0 comments on commit ab36966

Please sign in to comment.