Fix remove issue

This commit is contained in:
tom79 2019-05-04 18:35:36 +02:00
parent 7d1bbe5e5e
commit f6f1768d53
2 changed files with 3 additions and 3 deletions

View File

@ -394,7 +394,7 @@ public class ReorderTimelinesActivity extends BaseActivity implements OnStartDra
new TimelinesDAO(getApplicationContext(), db).remove(manageTimelines);
break;
case INSTANCE:
new InstancesDAO(getApplicationContext(), db).remove(manageTimelines.getRemoteInstance().getId());
new InstancesDAO(getApplicationContext(), db).remove(manageTimelines.getRemoteInstance().getHost());
new TimelinesDAO(getApplicationContext(), db).remove(manageTimelines);
break;
case LIST:

View File

@ -74,8 +74,8 @@ public class InstancesDAO {
* Remove instance by its name
* @return int
*/
public int remove(String id){
return db.delete(Sqlite.TABLE_INSTANCES, Sqlite.COL_ID + " = \"" + id + "\"", null);
public int remove(String host){
return db.delete(Sqlite.TABLE_INSTANCES, Sqlite.COL_INSTANCE + " = \"" + host + "\"", null);
}
//------- REMOVE -------