Skip to content

Commit

Permalink
Moar fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nift4 committed Mar 31, 2021
1 parent bfce8fa commit bb4d71d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,19 @@ public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup c
ROMFragment.Entry e = ROMFragment.current;
if (e.config.get("xsystem") != null)
Objects.requireNonNull(imodel.getParts().getValue()).add(Integer.parseInt(e.config.get("xsystem")));
if (e.config.get("xrom").equals("UT"))
if (e.config.get("xdata") != null)
Objects.requireNonNull(imodel.getParts().getValue()).add(Integer.parseInt(e.config.get("xdata")));
if (e.config.get("xtype").equals("UT"))
imodel.setROM(l.getROMs().stream().filter(r -> r.scriptname.equals("add_ubuntutouch_systemimage_haliumboot.sh")).findFirst().get());
else if (e.config.get("xrom").equals("SFOS"))
else if (e.config.get("xtype").equals("SFOS"))
imodel.setROM(l.getROMs().stream().filter(r -> r.scriptname.equals("add_sailfish.sh")).findFirst().get());
else
imodel.setROM(l.getROMs().stream().filter(r -> r.scriptname.equals("other_os.sh")).findFirst().get());
imodel.getName().add(e.config.get("title"));
imodel.getName().add(e.file.replace("/data/abm/bootset/lk2nd/entries/","").replace(".cfg",""));
Objects.requireNonNull(imodel.getROM().getValue()).parts.clear();
Objects.requireNonNull(imodel.getROM().getValue()).flashes.clear();
Objects.requireNonNull(imodel.getROM().getValue()).strings.clear();
Objects.requireNonNull(imodel.getParts().getValue()).add(Integer.parseInt(e.config.get("xdata")));
final View root = inflater.inflate(R.layout.wizard_installer_welcome, container, false);
final TextView message = root.findViewById(R.id.wizard_installer_welcome_txt);
message.setText(R.string.kernel_update_msg);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public ViewHolder(View view) {
AlertDialog d = new AlertDialog.Builder(requireContext())
.setCancelable(true)
.setNeutralButton(R.string.kernel_update, (p1, p2) -> {
if ((e.config.get("xsystem") == null ? "" : e.config.get("xsystem")).equals("real") || e.config.get("xdata").equals("real")) {
if ((e.config.get("xsystem") == null ? "" : e.config.get("xsystem")).equals("real") || (e.config.get("xdata") == null ? "" : e.config.get("xdata")).equals("real")) {
new AlertDialog.Builder(requireContext())
.setTitle(R.string.failed)
.setMessage(R.string.update_real_rom)
Expand All @@ -168,7 +168,7 @@ public ViewHolder(View view) {
return;
}
current = e;
startActivity(new Intent(requireActivity(), WizardActivity.class).putExtra("StartFragment", UpROMWelcomeWizardPageFragment.class));
startActivity(new Intent(requireActivity(), WizardActivity.class).putExtra("codename",model.getCodename().getValue()).putExtra("StartFragment", UpROMWelcomeWizardPageFragment.class));
})
.setNegativeButton(R.string.delete, (p1, p2) -> MiscUtils.sure(requireContext(), p1, getString(R.string.delete_msg_2, e.config.get("title")), (p112, p212) -> {
if (e.config.get("xsystem") != null && e.config.get("xdata") != null)
Expand Down

0 comments on commit bb4d71d

Please sign in to comment.