mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-29 13:17:43 +00:00
Swapped branches in if statement caused settings to not be stored in db
This commit is contained in:
parent
347c34927d
commit
c7b754a36e
@ -86,10 +86,10 @@ public class AppDatabase {
|
||||
ContentValues cv = new ContentValues();
|
||||
cv.put(KEY_IS_ENABLED, isEnabled?"true":"false");
|
||||
if (res.getCount() > 0) {
|
||||
ourDatabase.update(DATABASE_TABLE, cv, KEY_PACKAGE_NAME + "=?",new String[]{packageName});
|
||||
} else {
|
||||
cv.put(KEY_PACKAGE_NAME, packageName);
|
||||
ourDatabase.insert(DATABASE_TABLE, null, cv);
|
||||
} else {
|
||||
ourDatabase.update(DATABASE_TABLE, cv, KEY_PACKAGE_NAME + "=?",new String[]{packageName});
|
||||
}
|
||||
res.close();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user