Skip to content

Commit

Permalink
Remove oauth check on session load -- this will happen downstream, if…
Browse files Browse the repository at this point in the history
… neccessary
  • Loading branch information
jrobinso committed Jun 13, 2020
1 parent 32423f9 commit dd8e3c0
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions src/main/java/org/broad/igv/ui/IGV.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
import org.broad.igv.feature.Range;
import org.broad.igv.feature.*;
import org.broad.igv.feature.genome.*;
import org.broad.igv.google.OAuthUtils;
import org.broad.igv.lists.GeneList;
import org.broad.igv.prefs.IGVPreferences;
import org.broad.igv.prefs.PreferencesEditor;
Expand Down Expand Up @@ -477,6 +476,7 @@ public void run() {
showLoadedTrackCount();
IGV.this.repaint();
}

public String getName() {
return "Load Tracks";
}
Expand Down Expand Up @@ -1082,10 +1082,6 @@ public void doRestoreSession(final String sessionPath,
final String locus,
final boolean merge) {

// check to see if any files in session file are on protected (oauth) server. If
// so, make sure user is logged into server before -proceeding

OAuthUtils.getInstance().getProvider().checkServerLogin(sessionPath);
Runnable runnable = () -> restoreSessionSynchronous(sessionPath, locus, merge);
LongRunningTask.submit(runnable);
}
Expand Down Expand Up @@ -2371,7 +2367,6 @@ private synchronized void repaint(final JComponent component) {
if (track.isReadyToPaint(frame) == false) {
if (Globals.isBatch()) {
track.load(frame);
component.paintImmediately(component.getBounds());
} else {
futures.add(CompletableFuture.runAsync(() -> {
track.load(frame);
Expand All @@ -2382,7 +2377,14 @@ private synchronized void repaint(final JComponent component) {
}
}

if (futures.size() > 0) {
if (Globals.isBatch()) {
component.paintImmediately(component.getBounds());
} else if (futures.size() == 0) {
UIUtilities.invokeOnEventThread(() -> {
component.repaint();

});
} else {
final CompletableFuture[] futureArray = futures.toArray(new CompletableFuture[futures.size()]);
WaitCursorManager.CursorToken token = WaitCursorManager.showWaitCursor();
CompletableFuture.allOf(futureArray).thenApplyAsync(future -> {
Expand All @@ -2394,11 +2396,6 @@ private synchronized void repaint(final JComponent component) {
});
return null;
});
} else {
UIUtilities.invokeOnEventThread(() -> {
component.repaint();

});
}
}

Expand Down

0 comments on commit dd8e3c0

Please sign in to comment.