File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
app/src/main/java/com/hoc/pagination_mvi/ui/main Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ class MainInteractorImpl @Inject constructor(
34
34
.let { PhotoNextPage .Data (it) }
35
35
.let { send(it) }
36
36
} catch (e: Exception ) {
37
- delay( 500 )
37
+ delayError( )
38
38
send(PhotoNextPage .Error (e))
39
39
}
40
40
}
@@ -49,7 +49,7 @@ class MainInteractorImpl @Inject constructor(
49
49
.let { PhotoFirstPage .Data (it) }
50
50
.let { send(it) }
51
51
} catch (e: Exception ) {
52
- delay( 500 )
52
+ delayError( )
53
53
send(PhotoFirstPage .Error (e))
54
54
}
55
55
}
@@ -64,7 +64,7 @@ class MainInteractorImpl @Inject constructor(
64
64
.let { PostFirstPage .Data (it) }
65
65
.let { send(it) }
66
66
} catch (e: Exception ) {
67
- delay( 500 )
67
+ delayError( )
68
68
send(PostFirstPage .Error (e))
69
69
}
70
70
}
@@ -82,7 +82,7 @@ class MainInteractorImpl @Inject constructor(
82
82
.let { PostNextPage .Data (it) }
83
83
.let { send(it) }
84
84
} catch (e: Exception ) {
85
- delay( 500 )
85
+ delayError( )
86
86
send(PostNextPage .Error (e))
87
87
}
88
88
}
@@ -107,9 +107,11 @@ class MainInteractorImpl @Inject constructor(
107
107
)
108
108
}
109
109
} catch (e: Exception ) {
110
- delay( 500 )
110
+ delayError( )
111
111
send(Refresh .Error (e))
112
112
}
113
113
}
114
114
}
115
+
116
+ private suspend fun delayError () = delay(400 )
115
117
}
You can’t perform that action at this time.
0 commit comments