File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
java/com/github/kr328/clash/design Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,9 @@ class ProvidersDesign(
5555 fun requestUpdateAll () {
5656 adapter.states.filter { ! it.updating }.forEachIndexed { index, state ->
5757 state.updating = true
58-
59- requests.trySend(Request .Update (index, state.provider))
58+ if (state.provider.vehicleType != Provider .VehicleType .Inline ) {
59+ requests.trySend(Request .Update (index, state.provider))
60+ }
6061 }
6162 }
6263}
Original file line number Diff line number Diff line change @@ -55,10 +55,17 @@ class ProviderAdapter(
5555
5656 holder.binding.provider = state.provider
5757 holder.binding.state = state
58- holder.binding.update = View .OnClickListener {
59- state.updating = true
60-
61- requestUpdate(position, state.provider)
58+ if (state.provider.vehicleType == Provider .VehicleType .Inline ) {
59+ holder.binding.endView.visibility = View .GONE
60+ holder.binding.elapsedView.visibility = View .GONE
61+ holder.binding.divider.visibility = View .GONE
62+ } else {
63+ holder.binding.endView.visibility = View .VISIBLE
64+ holder.binding.elapsedView.visibility = View .VISIBLE
65+ holder.binding.update = View .OnClickListener {
66+ state.updating = true
67+ requestUpdate(position, state.provider)
68+ }
6269 }
6370 }
6471
Original file line number Diff line number Diff line change 5858 android : text =" @{IntervalKt.elapsedIntervalString(currentTime.value - state.updatedAt, context)}" />
5959
6060 <View
61+ android : id =" @+id/divider"
6162 android : layout_width =" @dimen/divider_size"
6263 android : layout_height =" wrap_content"
6364 android : layout_centerVertical =" true"
You can’t perform that action at this time.
0 commit comments