Fix issue #581 - List cannot be hidden.
This commit is contained in:
parent
4c1a8a6372
commit
191dc85d36
|
@ -24,7 +24,6 @@ import com.google.gson.annotations.SerializedName;
|
||||||
import com.google.gson.reflect.TypeToken;
|
import com.google.gson.reflect.TypeToken;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -155,17 +154,7 @@ public class Pinned implements Serializable {
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
Cursor c = db.query(Sqlite.TABLE_PINNED_TIMELINES, null, Sqlite.COL_INSTANCE + " = '" + account.instance + "' AND " + Sqlite.COL_USER_ID + " = '" + account.user_id + "'", null, null, null, Sqlite.COL_UPDATED_AT + " DESC", "1");
|
Cursor c = db.query(Sqlite.TABLE_PINNED_TIMELINES, null, Sqlite.COL_INSTANCE + " = '" + account.instance + "' AND " + Sqlite.COL_USER_ID + " = '" + account.user_id + "'", null, null, null, Sqlite.COL_UPDATED_AT + " DESC", "1");
|
||||||
Pinned pinned = cursorToPined(c);
|
return cursorToPined(c);
|
||||||
List<PinnedTimeline> pinnedTimelines = new ArrayList<>();
|
|
||||||
if (pinned != null) {
|
|
||||||
for (PinnedTimeline pinnedTimeline : pinned.pinnedTimelines) {
|
|
||||||
if (pinnedTimeline.displayed) {
|
|
||||||
pinnedTimelines.add(pinnedTimeline);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
pinned.pinnedTimelines = pinnedTimelines;
|
|
||||||
}
|
|
||||||
return pinned;
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue