Commit ffbb63d4 authored by Mathilde BALLOUHEY's avatar Mathilde BALLOUHEY
Browse files

Path bug de rechargement research list

parent 73fcd1e7
......@@ -23,6 +23,7 @@ import fr.iutnantes.miar.dndgenerator.api.dnd.DnDSystem;
public class ResearchResultsActivity extends AppCompatActivity {
private static final int ERROR_INTENT = -2;
private static boolean m_hasListRetour = false;
private static String TAG = "ResearchResultsActivity :: ";
public static final String SHEET = "sheet";
private static Bundle m_savedInstanceState;
......@@ -74,6 +75,10 @@ public class ResearchResultsActivity extends AppCompatActivity {
v_class = DnDClass.classes.get(m_classKey);
}
if(m_hasListRetour) {
m_hasListRetour = false;
return;
}
if (savedInstanceState != null && (m_systemKey == ERROR_INTENT || m_classKey == ERROR_INTENT)) {
m_listResults = (List<DnDSheet>) savedInstanceState.getSerializable("listResults");
}
......@@ -97,6 +102,7 @@ public class ResearchResultsActivity extends AppCompatActivity {
int v_index = data.getIntExtra(ListResultsAdapter.INDEX, -1);
if (v_index > -1) {
m_listResults.set(v_index, (DnDSheet) data.getSerializableExtra(DisplayResultActivity.SHEET));
m_hasListRetour = true;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment