discord-jadx/app/src/main/java/com/discord/stores/StoreSpotify$init$3.java

63 lines
3.0 KiB
Java

package com.discord.stores;
import com.discord.models.domain.spotify.ModelSpotifyTrack;
import com.discord.stores.StoreSpotify;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import rx.Subscription;
/* compiled from: StoreSpotify.kt */
public final class StoreSpotify$init$3 extends o implements Function1<ModelSpotifyTrack, Unit> {
public final /* synthetic */ StoreSpotify this$0;
/* compiled from: StoreSpotify.kt */
/* renamed from: com.discord.stores.StoreSpotify$init$3$1 reason: invalid class name */
public static final class AnonymousClass1 extends o implements Function0<Unit> {
public final /* synthetic */ ModelSpotifyTrack $track;
public final /* synthetic */ StoreSpotify$init$3 this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public AnonymousClass1(StoreSpotify$init$3 storeSpotify$init$3, ModelSpotifyTrack modelSpotifyTrack) {
super(0);
this.this$0 = storeSpotify$init$3;
this.$track = modelSpotifyTrack;
}
@Override // kotlin.jvm.functions.Function0
/* renamed from: invoke */
public final void mo1invoke() {
StoreSpotify.SpotifyState access$getSpotifyState$p = StoreSpotify.access$getSpotifyState$p(this.this$0.this$0);
if (access$getSpotifyState$p != null) {
StoreSpotify.access$setSpotifyState$p(this.this$0.this$0, StoreSpotify.SpotifyState.copy$default(access$getSpotifyState$p, this.$track, false, 0, 0, 14, null));
Subscription access$getExpireStateSub$p = StoreSpotify.access$getExpireStateSub$p(this.this$0.this$0);
if (access$getExpireStateSub$p != null) {
access$getExpireStateSub$p.unsubscribe();
}
if (this.$track != null) {
StoreSpotify.access$startStateExpiration(this.this$0.this$0, (this.$track.getDurationMs() + access$getSpotifyState$p.getStart()) - StoreSpotify.access$getClock$p(this.this$0.this$0).currentTimeMillis());
}
}
StoreSpotify.access$publishState(this.this$0.this$0);
}
}
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public StoreSpotify$init$3(StoreSpotify storeSpotify) {
super(1);
this.this$0 = storeSpotify;
}
/* Return type fixed from 'java.lang.Object' to match base method */
/* JADX DEBUG: Method arguments types fixed to match base method, original types: [java.lang.Object] */
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(ModelSpotifyTrack modelSpotifyTrack) {
invoke(modelSpotifyTrack);
return Unit.a;
}
public final void invoke(ModelSpotifyTrack modelSpotifyTrack) {
StoreSpotify.access$getDispatcher$p(this.this$0).schedule(new AnonymousClass1(this, modelSpotifyTrack));
}
}