Skip to content

Commit

Permalink
Fix to rate limitations on startup when using the GUI
Browse files Browse the repository at this point in the history
  • Loading branch information
SippieCup committed Aug 11, 2016
1 parent fcf8d14 commit 2a83b97
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/dekk/pw/pokemate/PokeMate.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import dekk.pw.pokemate.tasks.TaskController;
import dekk.pw.pokemate.tasks.Update;
import dekk.pw.pokemate.util.LatLongFromLocation;
import dekk.pw.pokemate.util.Time;
import javafx.application.Application;
import okhttp3.OkHttpClient;

Expand Down Expand Up @@ -97,13 +98,14 @@ private PokeMate() throws LoginFailedException, RemoteServerException {
context.setLat(lat);
context.setLng(lng);
go.setLocation(context.getLat().get(), context.getLng().get(), 0);
Time.sleep(5000);
new Update(context).runOnce();

if (Config.isShowUI()) {
PokeMateUI.setPoke(this);
new Thread(() -> Application.launch(PokeMateUI.class, "")).start();
}

Time.sleep(500);
TaskController controller = new TaskController(context);
controller.start();
startTime = System.currentTimeMillis();
Expand Down

0 comments on commit 2a83b97

Please sign in to comment.