Fix feed counters including non-subscribed podcasts (#7334)
This commit is contained in:
parent
600fdf0f8c
commit
6b63c6b9bb
|
@ -1309,7 +1309,7 @@ public class PodDBAdapter {
|
||||||
}
|
}
|
||||||
|
|
||||||
private Map<Long, Integer> conditionalFeedCounterRead(String whereRead, long... feedIds) {
|
private Map<Long, Integer> conditionalFeedCounterRead(String whereRead, long... feedIds) {
|
||||||
String limitFeeds = "";
|
String limitFeeds;
|
||||||
if (feedIds.length > 0) {
|
if (feedIds.length > 0) {
|
||||||
// work around TextUtils.join wanting only boxed items
|
// work around TextUtils.join wanting only boxed items
|
||||||
// and StringUtils.join() causing NoSuchMethodErrors on MIUI
|
// and StringUtils.join() causing NoSuchMethodErrors on MIUI
|
||||||
|
@ -1321,6 +1321,8 @@ public class PodDBAdapter {
|
||||||
// there's an extra ',', get rid of it
|
// there's an extra ',', get rid of it
|
||||||
builder.deleteCharAt(builder.length() - 1);
|
builder.deleteCharAt(builder.length() - 1);
|
||||||
limitFeeds = KEY_FEED + " IN (" + builder.toString() + ") AND ";
|
limitFeeds = KEY_FEED + " IN (" + builder.toString() + ") AND ";
|
||||||
|
} else {
|
||||||
|
limitFeeds = SELECT_WHERE_FEED_IS_SUBSCRIBED + " AND ";
|
||||||
}
|
}
|
||||||
|
|
||||||
final String query = "SELECT " + KEY_FEED + ", COUNT(" + TABLE_NAME_FEED_ITEMS + "." + KEY_ID + ") AS count "
|
final String query = "SELECT " + KEY_FEED + ", COUNT(" + TABLE_NAME_FEED_ITEMS + "." + KEY_ID + ") AS count "
|
||||||
|
|
Loading…
Reference in New Issue