Skip to content

Commit 553b65a

Browse files
author
AnkitDroidGit
committed
Added Retry operator
1 parent 0ef587b commit 553b65a

File tree

4 files changed

+9
-14
lines changed

4 files changed

+9
-14
lines changed

RxOperators/build.gradle

+5-8
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,18 @@ android {
2828

2929
dependencies {
3030
implementation fileTree(dir: 'libs', include: ['*.jar'])
31-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
32-
33-
//rxJava2
34-
implementation 'io.reactivex.rxjava2:rxjava:2.1.9'
35-
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
36-
31+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
3732
implementation 'com.android.support:recyclerview-v7:27.1.1'
3833
implementation 'com.android.support:design:27.1.1'
3934
implementation 'com.android.support:appcompat-v7:27.1.1'
4035
implementation 'com.android.support:animated-vector-drawable:27.1.1'
41-
4236
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
4337

44-
//Rx Binding
38+
//rxJava2
39+
implementation 'io.reactivex.rxjava2:rxjava:2.1.9'
40+
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
4541

42+
//Rx Binding
4643
implementation 'com.jakewharton.rxbinding2:rxbinding:2.1.1'
4744
implementation 'com.jakewharton.rxbinding2:rxbinding-support-v4:2.1.1'
4845
implementation 'com.jakewharton.rxbinding2:rxbinding-appcompat-v7:2.1.1'

RxOperators/src/main/java/com/freeankit/rxkotlinoperators/ui/RxOperators/errorHandlingOperators/RetryOperatorActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class RetryOperatorActivity : AppCompatActivity() {
3030
private fun executeRetryOperator() {
3131
getObservable()
3232
.retry()
33-
// .retryWhen(o -> o.delay(100, TimeUnit.MILLISECONDS))
33+
// .retryWhen(source -> source.delay(100, TimeUnit.MILLISECONDS))
3434
.debounce(500, TimeUnit.MILLISECONDS)
3535
// Run on a background thread
3636
.subscribeOn(Schedulers.io())

RxOperators/src/main/java/com/freeankit/rxkotlinoperators/ui/RxPagination/PaginationActivity.kt

+1-3
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,8 @@ class PaginationActivity : AppCompatActivity() {
4444

4545
private fun setUpLoadMoreListener() {
4646
recyclerView.addOnScrollListener(object : RecyclerView.OnScrollListener() {
47-
override fun onScrolled(recyclerView: RecyclerView,
48-
dx: Int, dy: Int) {
47+
override fun onScrolled(recyclerView: RecyclerView, dx: Int, dy: Int) {
4948
super.onScrolled(recyclerView, dx, dy)
50-
5149
totalItemCount = layoutManager?.itemCount!!
5250
lastVisibleItem = layoutManager?.findLastVisibleItemPosition()!!
5351
if (!loading && totalItemCount <= lastVisibleItem + VISIBLE_THRESHOLD) {

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// Top-level build file where you can add configuration options common to all sub-projects/modules.
22

33
buildscript {
4-
ext.kotlin_version = '1.2.40'
4+
ext.kotlin_version = '1.2.41'
55
repositories {
66
google()
77
jcenter()
88
}
99
dependencies {
10-
classpath 'com.android.tools.build:gradle:3.1.1'
10+
classpath 'com.android.tools.build:gradle:3.1.2'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1212

1313
// NOTE: Do not place your application dependencies here; they belong

0 commit comments

Comments
 (0)