mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-14 13:57:25 -08:00
I'm going to commit this now...
Still got work to do, but I don't want to lose this...
This commit is contained in:
@@ -23,6 +23,7 @@ import android.support.v7.widget.Toolbar;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
|
||||
import com.topjohnwu.magisk.module.RepoHelper;
|
||||
import com.topjohnwu.magisk.utils.Utils;
|
||||
|
||||
import butterknife.BindView;
|
||||
@@ -60,14 +61,21 @@ public class WelcomeActivity extends AppCompatActivity implements NavigationView
|
||||
new Utils.Initialize(this).execute();
|
||||
new Utils.CheckUpdates(this).execute();
|
||||
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
RepoHelper.TaskDelegate delegate = result -> {
|
||||
//Do a thing here when we get a result we want
|
||||
};
|
||||
if (!prefs.contains("oauth_key")) {
|
||||
|
||||
}
|
||||
if (!prefs.contains("hasCachedRepos")) {
|
||||
new Utils.LoadModules(this, true).execute();
|
||||
new Utils.LoadRepos(this, true,delegate).execute();
|
||||
|
||||
} else {
|
||||
new Utils.LoadModules(getApplication(),false).execute();
|
||||
}
|
||||
new Utils.LoadRepos(this, false,delegate).execute();
|
||||
|
||||
}
|
||||
|
||||
setSupportActionBar(toolbar);
|
||||
|
||||
@@ -146,6 +154,11 @@ public class WelcomeActivity extends AppCompatActivity implements NavigationView
|
||||
tag = "modules";
|
||||
navFragment = new ModulesFragment();
|
||||
break;
|
||||
case R.id.downloads:
|
||||
setTitle(R.string.downloads);
|
||||
tag = "downloads";
|
||||
navFragment = new ReposFragment();
|
||||
break;
|
||||
case R.id.log:
|
||||
setTitle(R.string.log);
|
||||
tag = "log";
|
||||
|
||||
Reference in New Issue
Block a user