44 lines
2.2 KiB
Java
44 lines
2.2 KiB
Java
package com.discord.stores;
|
|
|
|
import com.discord.stores.updates.ObservationDeck;
|
|
import com.discord.stores.updates.ObservationDeckProvider;
|
|
import d0.z.d.m;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import rx.Observable;
|
|
/* compiled from: StoreNotificationUpsells.kt */
|
|
public final class StoreNotificationUpsells extends StoreV2 {
|
|
private final Dispatcher dispatcher;
|
|
private final ObservationDeck observationDeck;
|
|
|
|
public StoreNotificationUpsells(Dispatcher dispatcher, ObservationDeck observationDeck) {
|
|
m.checkNotNullParameter(dispatcher, "dispatcher");
|
|
m.checkNotNullParameter(observationDeck, "observationDeck");
|
|
this.dispatcher = dispatcher;
|
|
this.observationDeck = observationDeck;
|
|
}
|
|
|
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
|
public /* synthetic */ StoreNotificationUpsells(Dispatcher dispatcher, ObservationDeck observationDeck, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(dispatcher, (i & 2) != 0 ? ObservationDeckProvider.get() : observationDeck);
|
|
}
|
|
|
|
public static final /* synthetic */ boolean access$getPushNotificationsUpsellDismissed(StoreNotificationUpsells storeNotificationUpsells) {
|
|
return storeNotificationUpsells.getPushNotificationsUpsellDismissed();
|
|
}
|
|
|
|
private final boolean getPushNotificationsUpsellDismissed() {
|
|
return getPrefsSessionDurable().getBoolean("PUSH_NOTIFICATIONS_DISMISS_UPSELL", false);
|
|
}
|
|
|
|
public final void dismissPushNotificationsUpsell() {
|
|
getPrefsSessionDurable().edit().putBoolean("PUSH_NOTIFICATIONS_DISMISS_UPSELL", true).apply();
|
|
this.dispatcher.schedule(new StoreNotificationUpsells$dismissPushNotificationsUpsell$1(this));
|
|
}
|
|
|
|
public final Observable<Boolean> observePushNotificationUpsellDismissed() {
|
|
Observable<Boolean> q = ObservationDeck.connectRx$default(this.observationDeck, new ObservationDeck.UpdateSource[]{this}, false, null, null, new StoreNotificationUpsells$observePushNotificationUpsellDismissed$1(this), 14, null).q();
|
|
m.checkNotNullExpressionValue(q, "observationDeck.connectR… .distinctUntilChanged()");
|
|
return q;
|
|
}
|
|
}
|