@@ -257,6 +257,7 @@ public void onPathReceived(String path) {
257257 moduleViewListBuilder .addNotification (NotificationType .INSTALL_FROM_STORAGE );
258258 ModuleManager .getINSTANCE ().scan ();
259259 ModuleManager .getINSTANCE ().runAfterScan (moduleViewListBuilder ::appendInstalledModules );
260+ ModuleManager .getINSTANCE ().runAfterScan (moduleViewListBuilderOnline ::appendRemoteModules );
260261 this .commonNext ();
261262 }
262263
@@ -276,6 +277,7 @@ public void commonNext() {
276277 NotificationType .NO_INTERNET .autoAdd (moduleViewListBuilderOnline );
277278 // hide progress bar is repo-manager says we have no internet
278279 if (!RepoManager .getINSTANCE ().hasConnectivity ()) {
280+ Timber .i ("No connection, hiding progress" );
279281 runOnUiThread (() -> {
280282 progressIndicator .setVisibility (View .GONE );
281283 progressIndicator .setIndeterminate (false );
@@ -300,12 +302,6 @@ public void commonNext() {
300302 });
301303 }
302304 moduleViewListBuilder .applyTo (moduleList , moduleViewAdapter );
303- runOnUiThread (() -> {
304- progressIndicator .setIndeterminate (false );
305- progressIndicator .setMax (PRECISION );
306- // Fix insets not being accounted for correctly
307- updateScreenInsets (getResources ().getConfiguration ());
308- });
309305
310306 Timber .i ("Scanning for modules!" );
311307 if (BuildConfig .DEBUG ) Timber .i ("Initialize Update" );
@@ -367,16 +363,8 @@ public void commonNext() {
367363 }
368364 }
369365 }
370- runOnUiThread (() -> {
371- progressIndicator .setProgressCompat (PRECISION , true );
372- progressIndicator .setVisibility (View .GONE );
373- searchView .setEnabled (true );
374- updateScreenInsets (getResources ().getConfiguration ());
375- });
376366 if (BuildConfig .DEBUG ) Timber .i ("Apply" );
377367 RepoManager .getINSTANCE ().runAfterUpdate (moduleViewListBuilderOnline ::appendRemoteModules );
378- // logic to handle updateable modules
379- moduleViewListBuilder .applyTo (moduleListOnline , moduleViewAdapterOnline );
380368 moduleViewListBuilderOnline .applyTo (moduleListOnline , moduleViewAdapterOnline );
381369 // if moduleViewListBuilderOnline has the upgradeable notification, show a badge on the online repo nav item
382370 if (MainApplication .getINSTANCE ().modulesHaveUpdates ) {
@@ -389,6 +377,12 @@ public void commonNext() {
389377 Timber .i ("Badge applied" );
390378 });
391379 }
380+ runOnUiThread (() -> {
381+ progressIndicator .setProgressCompat (PRECISION , true );
382+ progressIndicator .setVisibility (View .GONE );
383+ searchView .setEnabled (true );
384+ updateScreenInsets (getResources ().getConfiguration ());
385+ });
392386 Timber .i ("Finished app opening state!" );
393387 }
394388 }, true );
0 commit comments