Caching bug fixed

This commit is contained in:
Gavriil Sitnikov 2017-03-03 18:11:37 +03:00
parent 4f5353d261
commit 2927215c57
1 changed files with 4 additions and 4 deletions

View File

@ -149,8 +149,8 @@ public class Storable<TKey, TObject, TStoreObject> {
.concatWith(newStoreValueEvent)
.map(storeObject -> returnDefaultValueIfNull(storeObject, defaultValue));
return observeStrategy == ObserveStrategy.CACHE_STORE_VALUE || observeStrategy == ObserveStrategy.CACHE_STORE_AND_ACTUAL_VALUE
? result
: result.replay(1).refCount();
? result.replay(1).refCount()
: result;
}
@NonNull
@ -169,8 +169,8 @@ public class Storable<TKey, TObject, TStoreObject> {
}
}));
return observeStrategy == ObserveStrategy.CACHE_ACTUAL_VALUE || observeStrategy == ObserveStrategy.CACHE_STORE_AND_ACTUAL_VALUE
? result
: result.replay(1).refCount();
? result.replay(1).refCount()
: result;
}
/**