mirror of
https://github.com/TimeCrafters/TimeCraftersConfigurationTool.git
synced 2025-12-15 05:02:33 +00:00
Fixed crashes due to Backend not being set before permissions are granted
This commit is contained in:
@@ -45,9 +45,9 @@ public class MainActivity extends AppCompatActivity {
|
||||
if (Backend.instance() == null) {
|
||||
new Backend();
|
||||
}
|
||||
}
|
||||
|
||||
Backend.instance().applicationContext = getApplicationContext();
|
||||
Backend.instance().applicationContext = getApplicationContext();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user