Some fixes
This commit is contained in:
parent
1e57a90dfc
commit
136a72721f
|
@ -123,14 +123,6 @@ public class SyncTimelinesAsyncTask {
|
|||
i++;
|
||||
manageTimelines.add(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();
|
||||
|
@ -161,8 +153,9 @@ public class SyncTimelinesAsyncTask {
|
|||
i++;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
new TimelinesDAO(contextReference.get(), db).removePeertube();
|
||||
}
|
||||
|
||||
List<TagTimeline> tagsInDb = new SearchDAO(contextReference.get(), db).getAll();
|
||||
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);
|
||||
}
|
||||
|
||||
public int removePeertube() {
|
||||
return db.delete(Sqlite.TABLE_TIMELINES, Sqlite.COL_TYPE + " = \"" + ManageTimelines.typeToDb(ManageTimelines.Type.PEERTUBE) + "\"", null);
|
||||
}
|
||||
|
||||
//------- REMOVE -------
|
||||
public int removeAll() {
|
||||
SharedPreferences sharedpreferences = context.getSharedPreferences(Helper.APP_PREFS, Context.MODE_PRIVATE);
|
||||
|
|
Loading…
Reference in New Issue