Skip to content

Commit

Permalink
Merge pull request #900 from bugsnag/v5rn-plugin-load-order
Browse files Browse the repository at this point in the history
Ensure plugins are loaded before flushing errors
  • Loading branch information
fractalwrench authored Jul 10, 2020
2 parents 0fc190a + 03f0c1e commit 3a31b88
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,17 +234,19 @@ public void run() {
} else {
this.systemBroadcastReceiver = null;
}
connectivity.registerForNetworkChanges();

registerOrientationChangeListener();

// initialise plugins before attempting to flush any errors
loadPlugins(configuration);

// Flush any on-disk errors
connectivity.registerForNetworkChanges();
eventStore.flushOnLaunch();

// leave auto breadcrumb
Map<String, Object> data = Collections.emptyMap();
leaveAutoBreadcrumb("Bugsnag loaded", BreadcrumbType.STATE, data);

// finally, initialise plugins
loadPlugins(configuration);
}

@VisibleForTesting
Expand Down

0 comments on commit 3a31b88

Please sign in to comment.