26 lines
1.4 KiB
Java
26 lines
1.4 KiB
Java
package com.discord.widgets.status;
|
|
|
|
import com.discord.widgets.status.WidgetGlobalStatusIndicatorViewModel;
|
|
import j0.k.b;
|
|
import j0.l.e.k;
|
|
import java.util.concurrent.TimeUnit;
|
|
import rx.Observable;
|
|
/* compiled from: WidgetGlobalStatusIndicator.kt */
|
|
/* loaded from: classes2.dex */
|
|
public final class WidgetGlobalStatusIndicator$bindDelay$1<T, R> implements b<WidgetGlobalStatusIndicatorViewModel.ViewState, Observable<? extends WidgetGlobalStatusIndicatorViewModel.ViewState>> {
|
|
public final /* synthetic */ Observable $this_bindDelay;
|
|
|
|
public WidgetGlobalStatusIndicator$bindDelay$1(Observable observable) {
|
|
this.$this_bindDelay = observable;
|
|
}
|
|
|
|
public final Observable<? extends WidgetGlobalStatusIndicatorViewModel.ViewState> call(WidgetGlobalStatusIndicatorViewModel.ViewState viewState) {
|
|
Long valueOf = viewState instanceof WidgetGlobalStatusIndicatorViewModel.ViewState.Offline ? Long.valueOf(((WidgetGlobalStatusIndicatorViewModel.ViewState.Offline) viewState).getDelay()) : viewState instanceof WidgetGlobalStatusIndicatorViewModel.ViewState.Connecting ? Long.valueOf(((WidgetGlobalStatusIndicatorViewModel.ViewState.Connecting) viewState).getDelay()) : null;
|
|
if (valueOf == null) {
|
|
return this.$this_bindDelay;
|
|
}
|
|
valueOf.longValue();
|
|
return (Observable<T>) new k(viewState).q(valueOf.longValue(), TimeUnit.MILLISECONDS);
|
|
}
|
|
}
|