mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +01:00
App downloads too many of my contributions, without reason (#4916)
* Init commit * Fixed tests
This commit is contained in:
parent
bd9531b969
commit
85bdcd5a7a
2 changed files with 2 additions and 5 deletions
|
|
@ -36,11 +36,10 @@ class ContributionBoundaryCallback @Inject constructor(
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* It is triggered when the user scrolls to the top of the list User's Contributions are then
|
* It is triggered when the user scrolls to the top of the list
|
||||||
* fetched from the network
|
|
||||||
* */
|
* */
|
||||||
override fun onItemAtFrontLoaded(itemAtFront: Contribution) {
|
override fun onItemAtFrontLoaded(itemAtFront: Contribution) {
|
||||||
fetchContributions()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -85,8 +85,6 @@ class ContributionBoundaryCallbackTest {
|
||||||
whenever(mediaClient.getMediaListForUser(anyString()))
|
whenever(mediaClient.getMediaListForUser(anyString()))
|
||||||
.thenReturn(Single.just(listOf(media())))
|
.thenReturn(Single.just(listOf(media())))
|
||||||
contributionBoundaryCallback.onItemAtFrontLoaded(mock(Contribution::class.java))
|
contributionBoundaryCallback.onItemAtFrontLoaded(mock(Contribution::class.java))
|
||||||
verify(repository).save(anyList());
|
|
||||||
verify(mediaClient).getMediaListForUser(anyString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue