mirror of https://github.com/readrops/Readrops.git
Enable set all items and all feed items read state features for local accounts only
This commit is contained in:
parent
056d8db78f
commit
8f017753cc
|
@ -129,11 +129,19 @@ public abstract class ARepository {
|
|||
}
|
||||
|
||||
public Completable setAllItemsReadState(boolean read) {
|
||||
return database.itemDao().setAllItemsReadState(read ? 1 : 0, account.getId());
|
||||
if (account.isLocal()) { // TODO see if it's possible to implement for others accounts
|
||||
return database.itemDao().setAllItemsReadState(read ? 1 : 0, account.getId());
|
||||
} else {
|
||||
return Completable.complete();
|
||||
}
|
||||
}
|
||||
|
||||
public Completable setAllFeedItemsReadState(int feedId, boolean read) {
|
||||
return database.itemDao().setAllFeedItemsReadState(feedId, read ? 1 : 0);
|
||||
if (account.isLocal()) {
|
||||
return database.itemDao().setAllFeedItemsReadState(feedId, read ? 1 : 0);
|
||||
} else {
|
||||
return Completable.complete();
|
||||
}
|
||||
}
|
||||
|
||||
public Completable setItemStarState(Item item) {
|
||||
|
@ -147,7 +155,6 @@ public abstract class ARepository {
|
|||
return database.itemStateChangesDao().upsertItemStarStateChange(item, account.getId(), false)
|
||||
.andThen(database.itemDao().setStarState(item.getId(), item.isStarred()));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public Single<Integer> getFeedCount(int accountId) {
|
||||
|
|
Loading…
Reference in New Issue