mirror of
https://github.com/Team4388/RidgeScout.git
synced 2026-06-09 08:38:03 -06:00
Add background, fix a crash
This commit is contained in:
@@ -72,7 +72,7 @@ public class FieldPosView extends FrameLayout {
|
||||
return false;
|
||||
});
|
||||
|
||||
setImageResource(R.drawable.field_2024);
|
||||
setImageResource(R.drawable.field_2025);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ public class MultiFieldPosView extends FrameLayout {
|
||||
imageView.setAdjustViewBounds(true);
|
||||
addView(imageView);
|
||||
|
||||
setImageResource(R.drawable.field_2024);
|
||||
setImageResource(R.drawable.field_2025);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.ridgebotics.ridgescout.R;
|
||||
import com.ridgebotics.ridgescout.utility.AlertManager;
|
||||
import com.ridgebotics.ridgescout.utility.settingsManager;
|
||||
import com.ridgebotics.ridgescout.databinding.FragmentScoutingBinding;
|
||||
import com.ridgebotics.ridgescout.types.frcTeam;
|
||||
@@ -36,7 +37,9 @@ public class ScoutingFragment extends Fragment {
|
||||
|
||||
String evcode = settingsManager.getEVCode();
|
||||
|
||||
if(evcode.equals("unset")){
|
||||
DataManager.reload_event();
|
||||
|
||||
if(event == null){
|
||||
binding.noEventError.setVisibility(View.VISIBLE);
|
||||
binding.matchScoutingButton.setEnabled(false);
|
||||
binding.pitScoutingButton.setEnabled(false);
|
||||
@@ -45,11 +48,6 @@ public class ScoutingFragment extends Fragment {
|
||||
return binding.getRoot();
|
||||
}
|
||||
|
||||
DataManager.reload_event();
|
||||
|
||||
if(event.matches.isEmpty())
|
||||
binding.matchScoutingButton.setVisibility(View.GONE);
|
||||
|
||||
binding.matchScoutingButton.setOnClickListener(v -> {
|
||||
findNavController(this).navigate(R.id.action_navigation_scouting_to_navigation_match_scouting);
|
||||
});
|
||||
|
||||
@@ -143,6 +143,8 @@ public class FTPSync extends Thread {
|
||||
for (String remoteFile : remoteTimestamps.keySet()) {
|
||||
File localFile = new File(baseDir, remoteFile);
|
||||
if(remoteFile.equals(timestampsFilename)) continue;
|
||||
// Remove meta files if the option is disabled
|
||||
if(!sendMetaFiles && meta_string_array.contains(remoteFile)) continue;
|
||||
|
||||
// Date t1 = getLocalFileUtcTimestamp(localFile);
|
||||
// Date t2 = getUtcTimestamp(remoteFile);
|
||||
|
||||
@@ -58,6 +58,10 @@ public class TBAFragment extends Fragment {
|
||||
|
||||
final RequestTask rq = new RequestTask();
|
||||
rq.onResult(s -> {
|
||||
if(s == null || s.isEmpty()) {
|
||||
AlertManager.error("Could not fetch event!");
|
||||
return null;
|
||||
}
|
||||
eventTable(s);
|
||||
return null;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user