mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Fixed issue with progress bar
This commit is contained in:
parent
c98ae7e22f
commit
0b757741fd
4 changed files with 2 additions and 36 deletions
|
|
@ -704,7 +704,7 @@ public class ContributionsFragment
|
|||
uploadsErrorTextView.setVisibility(View.VISIBLE);
|
||||
uploadsErrorTextView.setText(String.valueOf(errorCount));
|
||||
}else {
|
||||
uploadsErrorTextView.setVisibility(View.INVISIBLE);
|
||||
uploadsErrorTextView.setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -399,22 +399,6 @@ public class MainActivity extends BaseActivity
|
|||
}
|
||||
}
|
||||
|
||||
public void toggleLimitedConnectionMode() {
|
||||
defaultKvStore.putBoolean(CommonsApplication.IS_LIMITED_CONNECTION_MODE_ENABLED,
|
||||
!defaultKvStore
|
||||
.getBoolean(CommonsApplication.IS_LIMITED_CONNECTION_MODE_ENABLED, false));
|
||||
if (defaultKvStore
|
||||
.getBoolean(CommonsApplication.IS_LIMITED_CONNECTION_MODE_ENABLED, false)) {
|
||||
viewUtilWrapper
|
||||
.showShortToast(getBaseContext(), getString(R.string.limited_connection_enabled));
|
||||
} else {
|
||||
WorkRequestHelper.Companion.makeOneTimeWorkRequest(getApplicationContext(),
|
||||
ExistingWorkPolicy.APPEND_OR_REPLACE);
|
||||
viewUtilWrapper
|
||||
.showShortToast(getBaseContext(), getString(R.string.limited_connection_disabled));
|
||||
}
|
||||
}
|
||||
|
||||
public void centerMapToPlace(Place place) {
|
||||
setSelectedItemId(NavTab.NEARBY.code());
|
||||
nearbyParentFragment.setNearbyParentFragmentInstanceReadyCallback(new NearbyParentFragmentInstanceReadyCallback() {
|
||||
|
|
|
|||
|
|
@ -179,6 +179,7 @@ class UploadProgressActivity : BaseActivity() {
|
|||
*/
|
||||
@SuppressLint("CheckResult")
|
||||
private fun retryAllFailedUploads() {
|
||||
pendingUploadsFragment!!.resetProgressBar()
|
||||
contributionDao.getContribution(listOf(Contribution.STATE_FAILED))
|
||||
.subscribeOn(Schedulers.io())
|
||||
.subscribe { failedUploads: List<Contribution?> ->
|
||||
|
|
|
|||
|
|
@ -195,25 +195,6 @@ class MainActivityUnitTests {
|
|||
MainActivity.startYourself(mockContext)
|
||||
}
|
||||
|
||||
@Test
|
||||
@Throws(Exception::class)
|
||||
fun testToggleLimitedConnectionModeCaseDefault() {
|
||||
activity.toggleLimitedConnectionMode()
|
||||
}
|
||||
|
||||
@Test
|
||||
@Throws(Exception::class)
|
||||
fun testToggleLimitedConnectionMode() {
|
||||
Shadows.shadowOf(Looper.getMainLooper()).idle()
|
||||
`when`(
|
||||
defaultKvStore.getBoolean(
|
||||
CommonsApplication.IS_LIMITED_CONNECTION_MODE_ENABLED, false
|
||||
)
|
||||
)
|
||||
.thenReturn(false)
|
||||
activity.toggleLimitedConnectionMode()
|
||||
}
|
||||
|
||||
@Test
|
||||
@Throws(Exception::class)
|
||||
fun testSetUpPager() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue