Some fixes
This commit is contained in:
parent
1e57a90dfc
commit
136a72721f
|
@ -123,14 +123,6 @@ public class SyncTimelinesAsyncTask {
|
||||||
i++;
|
i++;
|
||||||
manageTimelines.add(manageArt);
|
manageTimelines.add(manageArt);
|
||||||
new TimelinesDAO(contextReference.get(), db).insert(manageArt);
|
new TimelinesDAO(contextReference.get(), db).insert(manageArt);
|
||||||
//Add Public PEERTUBE
|
|
||||||
ManageTimelines managePeertube = new ManageTimelines();
|
|
||||||
managePeertube.setDisplayed(true);
|
|
||||||
managePeertube.setType(ManageTimelines.Type.PEERTUBE);
|
|
||||||
managePeertube.setPosition(i);
|
|
||||||
i++;
|
|
||||||
manageTimelines.add(managePeertube);
|
|
||||||
new TimelinesDAO(contextReference.get(), db).insert(managePeertube);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<TagTimeline> tagTimelines = new SearchDAO(contextReference.get(), db).getAll();
|
List<TagTimeline> tagTimelines = new SearchDAO(contextReference.get(), db).getAll();
|
||||||
|
@ -161,8 +153,9 @@ public class SyncTimelinesAsyncTask {
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
new TimelinesDAO(contextReference.get(), db).removePeertube();
|
||||||
}
|
}
|
||||||
|
|
||||||
List<TagTimeline> tagsInDb = new SearchDAO(contextReference.get(), db).getAll();
|
List<TagTimeline> tagsInDb = new SearchDAO(contextReference.get(), db).getAll();
|
||||||
List<RemoteInstance> instancesInDb = new InstancesDAO(contextReference.get(), db).getAllInstances();
|
List<RemoteInstance> instancesInDb = new InstancesDAO(contextReference.get(), db).getAllInstances();
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,10 @@ public class TimelinesDAO {
|
||||||
return db.delete(Sqlite.TABLE_TIMELINES, Sqlite.COL_ID + " = \"" + timeline.getId() + "\"", null);
|
return db.delete(Sqlite.TABLE_TIMELINES, Sqlite.COL_ID + " = \"" + timeline.getId() + "\"", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int removePeertube() {
|
||||||
|
return db.delete(Sqlite.TABLE_TIMELINES, Sqlite.COL_TYPE + " = \"" + ManageTimelines.typeToDb(ManageTimelines.Type.PEERTUBE) + "\"", null);
|
||||||
|
}
|
||||||
|
|
||||||
//------- REMOVE -------
|
//------- REMOVE -------
|
||||||
public int removeAll() {
|
public int removeAll() {
|
||||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||||
|
|
Loading…
Reference in New Issue