discord-jadx/app/src/main/java/com/discord/widgets/servers/WidgetServerNotifications$c...

29 lines
1.4 KiB
Java

package com.discord.widgets.servers;
import android.content.Context;
import com.discord.stores.StoreStream;
import com.discord.stores.StoreUserGuildSettings;
import com.discord.views.CheckedSetting;
import com.discord.widgets.servers.WidgetServerNotifications;
import d0.z.d.m;
import rx.functions.Action1;
/* compiled from: WidgetServerNotifications.kt */
public final class WidgetServerNotifications$configureUI$3<T> implements Action1<Boolean> {
public final /* synthetic */ WidgetServerNotifications.Model $model;
public final /* synthetic */ WidgetServerNotifications this$0;
public WidgetServerNotifications$configureUI$3(WidgetServerNotifications widgetServerNotifications, WidgetServerNotifications.Model model) {
this.this$0 = widgetServerNotifications;
this.$model = model;
}
public final void call(Boolean bool) {
StoreUserGuildSettings userGuildSettings = StoreStream.Companion.getUserGuildSettings();
CheckedSetting checkedSetting = WidgetServerNotifications.access$getBinding$p(this.this$0).k;
m.checkNotNullExpressionValue(checkedSetting, "binding.serverNotificationsPushSwitch");
Context context = checkedSetting.getContext();
m.checkNotNullExpressionValue(context, "binding.serverNotificationsPushSwitch.context");
userGuildSettings.setGuildToggles(context, this.$model.getGuild(), null, null, null, Boolean.valueOf(!this.$model.getGuildSettings().isMobilePush()));
}
}