1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-11 11:14:03 +02:00

change user order from old to new user

This commit is contained in:
OliE
2017-06-04 16:17:38 +02:00
parent 29e67659a5
commit 4a34cdc6db
2 changed files with 2 additions and 2 deletions

View File

@@ -171,7 +171,7 @@ public class ScaleUserDatabase extends SQLiteOpenHelper {
SQLiteDatabase db = getReadableDatabase();
ArrayList<ScaleUser> scaleUserDBEntries = new ArrayList<ScaleUser>();
String sortOrder = COLUMN_NAME_ID + " DESC";
String sortOrder = COLUMN_NAME_ID + " ASC";
Cursor cursorScaleDB = db.query(
TABLE_NAME, // The table to query

View File

@@ -292,7 +292,7 @@ public class UserSettingsActivity extends Activity {
{
openScale.addScaleUser(name, date, body_height, scale_unit, gender, goal_weight, goal_date);
id = openScale.getScaleUserList().get(0).id;
id = openScale.getScaleUserList().get(openScale.getScaleUserList().size()-1).id;
}
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);