Disable query observing when synchronising to avoid view flickering
This commit is contained in:
parent
e55dcca556
commit
b7b4ae9dc4
@ -631,6 +631,8 @@ public class MainActivity extends AppCompatActivity implements SwipeRefreshLayou
|
||||
|
||||
@Override
|
||||
public void onComplete() {
|
||||
viewModel.invalidate();
|
||||
|
||||
if (viewModel.isAccountLocal() && feedNb > 0) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||
binding.syncProgressBar.setProgress(100, true);
|
||||
|
@ -125,6 +125,7 @@ public class MainViewModel extends ViewModel {
|
||||
}
|
||||
|
||||
public Observable<Feed> sync(List<Feed> feeds) {
|
||||
itemsWithFeed.removeSource(lastFetch);
|
||||
return repository.sync(feeds);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user