Fixed crashes due to Backend not being set before permissions are granted

This commit is contained in:
2020-09-29 19:21:03 -05:00
parent 8fe3035a0d
commit 81bd3e6b2f
2 changed files with 7 additions and 6 deletions

View File

@@ -45,9 +45,9 @@ public class MainActivity extends AppCompatActivity {
if (Backend.instance() == null) {
new Backend();
}
}
Backend.instance().applicationContext = getApplicationContext();
Backend.instance().applicationContext = getApplicationContext();
}
}
@Override

View File

@@ -60,12 +60,13 @@ public class GroupsFragment extends TimeCraftersFragment {
});
floatingActionButtonAutoHide(actionButton, scrollView);
if (Backend.instance().getConfig() == null) {
actionButton.hide();
}
if (Backend.instance() != null) {
if (Backend.instance().getConfig() == null) {
actionButton.hide();
}
if (Backend.instance() != null)
this.config = Backend.instance().getConfig();
}
if (config != null) {
configName.setVisibility(View.GONE);