1
0
Fork 0

PowerEditor: bug fix, emptying a field wouldn't save

This commit is contained in:
kauron 2015-07-19 20:49:47 +02:00
parent 383341c72a
commit b3bdfc1eb7

View file

@ -175,8 +175,9 @@ public class PowerEditor extends ActionBarActivity {
SharedPreferences.Editor ed = getSharedPreferences( saveName, MODE_PRIVATE).edit(); SharedPreferences.Editor ed = getSharedPreferences( saveName, MODE_PRIVATE).edit();
for (int i = 0; i < strings.length; i++) for (int i = 0; i < strings.length; i++)
if (!strings[i].isEmpty()) if (strings[i].isEmpty())
ed.putString("s" + i, strings[i]); ed.remove("s" + i);
else ed.putString("s" + i, strings[i]);
for (int i = 0; i < ints.length; i++) for (int i = 0; i < ints.length; i++)
ed.putInt("i" + i, ints[i]); ed.putInt("i" + i, ints[i]);
ed.apply(); ed.apply();