498 lines
23 KiB
Java
498 lines
23 KiB
Java
package com.discord.widgets.servers;
|
|
|
|
import a0.a.a.b;
|
|
import android.content.Context;
|
|
import android.content.Intent;
|
|
import android.view.View;
|
|
import android.widget.LinearLayout;
|
|
import android.widget.TextView;
|
|
import androidx.fragment.app.Fragment;
|
|
import androidx.recyclerview.widget.RecyclerView;
|
|
import c.a.d.l;
|
|
import c.a.d.o;
|
|
import c.d.b.a.a;
|
|
import com.discord.app.AppActivity;
|
|
import com.discord.app.AppFragment;
|
|
import com.discord.databinding.WidgetServerSettingsEditMemberBinding;
|
|
import com.discord.models.guild.Guild;
|
|
import com.discord.models.member.GuildMember;
|
|
import com.discord.models.user.User;
|
|
import com.discord.restapi.RestAPIParams;
|
|
import com.discord.stores.StoreStream;
|
|
import com.discord.stores.StoreUser;
|
|
import com.discord.utilities.mg_recycler.MGRecyclerAdapter;
|
|
import com.discord.utilities.rest.RestAPI;
|
|
import com.discord.utilities.rx.ObservableExtensionsKt;
|
|
import com.discord.utilities.stateful.StatefulViews;
|
|
import com.discord.utilities.view.extensions.ViewExtensions;
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegate;
|
|
import com.discord.utilities.viewbinding.FragmentViewBindingDelegateKt;
|
|
import com.discord.widgets.servers.WidgetServerSettingsEditMemberRolesAdapter;
|
|
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
|
import com.google.android.material.textfield.TextInputLayout;
|
|
import d0.z.d.m;
|
|
import java.util.List;
|
|
import java.util.Set;
|
|
import kotlin.jvm.functions.Function0;
|
|
import kotlin.jvm.functions.Function1;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.reflect.KProperty;
|
|
import rx.Observable;
|
|
/* compiled from: WidgetServerSettingsEditMember.kt */
|
|
public final class WidgetServerSettingsEditMember extends AppFragment {
|
|
public static final /* synthetic */ KProperty[] $$delegatedProperties = {a.W(WidgetServerSettingsEditMember.class, "binding", "getBinding()Lcom/discord/databinding/WidgetServerSettingsEditMemberBinding;", 0)};
|
|
public static final Companion Companion = new Companion(null);
|
|
private static final String INTENT_EXTRA_GUILD_ID = "INTENT_EXTRA_GUILD_ID";
|
|
private static final String INTENT_EXTRA_USER_ID = "INTENT_EXTRA_USER_ID";
|
|
private final FragmentViewBindingDelegate binding$delegate = FragmentViewBindingDelegateKt.viewBinding$default(this, WidgetServerSettingsEditMember$binding$2.INSTANCE, null, 2, null);
|
|
private WidgetServerSettingsEditMemberRolesAdapter rolesAdapter;
|
|
private final StatefulViews state = new StatefulViews(2131363016);
|
|
|
|
/* compiled from: WidgetServerSettingsEditMember.kt */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public final void launch(long j, long j2, Context context) {
|
|
m.checkNotNullParameter(context, "context");
|
|
Intent intent = new Intent();
|
|
intent.putExtra("INTENT_EXTRA_GUILD_ID", j);
|
|
intent.putExtra("INTENT_EXTRA_USER_ID", j2);
|
|
l.d(context, WidgetServerSettingsEditMember.class, intent);
|
|
}
|
|
}
|
|
|
|
/* compiled from: WidgetServerSettingsEditMember.kt */
|
|
public static final class Model {
|
|
public static final Companion Companion = new Companion(null);
|
|
private final boolean canBan;
|
|
private final boolean canChangeNickname;
|
|
private final boolean canKick;
|
|
private final boolean canManage;
|
|
private final boolean canTransferOwnership;
|
|
private final Guild guild;
|
|
private final long myId;
|
|
private final List<WidgetServerSettingsEditMemberRolesAdapter.RoleItem> roleItems;
|
|
private final User user;
|
|
private final GuildMember userComputed;
|
|
private final Set<Long> userRoles;
|
|
|
|
/* compiled from: WidgetServerSettingsEditMember.kt */
|
|
public static final class Companion {
|
|
private Companion() {
|
|
}
|
|
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
public final Observable<Model> get(long j, long j2) {
|
|
StoreStream.Companion companion = StoreStream.Companion;
|
|
Observable r = Observable.f(StoreUser.observeMe$default(companion.getUsers(), false, 1, null), companion.getUsers().observeUser(j2), companion.getGuilds().observeComputed(j), companion.getGuilds().observeGuild(j), companion.getGuilds().observeRoles(j), companion.getPermissions().observePermissionsForGuild(j), new WidgetServerSettingsEditMember$Model$Companion$get$1(j, j2)).r();
|
|
m.checkNotNullExpressionValue(r, "Observable.combineLatest… .distinctUntilChanged()");
|
|
return ObservableExtensionsKt.computationLatest(r);
|
|
}
|
|
}
|
|
|
|
public Model(long j, Guild guild, GuildMember guildMember, Set<Long> set, User user, List<WidgetServerSettingsEditMemberRolesAdapter.RoleItem> list, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6) {
|
|
m.checkNotNullParameter(guild, "guild");
|
|
m.checkNotNullParameter(guildMember, "userComputed");
|
|
m.checkNotNullParameter(set, "userRoles");
|
|
m.checkNotNullParameter(user, "user");
|
|
m.checkNotNullParameter(list, "roleItems");
|
|
this.myId = j;
|
|
this.guild = guild;
|
|
this.userComputed = guildMember;
|
|
this.userRoles = set;
|
|
this.user = user;
|
|
this.roleItems = list;
|
|
this.canManage = z2;
|
|
this.canKick = z3;
|
|
this.canBan = z4;
|
|
this.canChangeNickname = z5;
|
|
this.canTransferOwnership = z6;
|
|
}
|
|
|
|
public static /* synthetic */ Model copy$default(Model model, long j, Guild guild, GuildMember guildMember, Set set, User user, List list, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6, int i, Object obj) {
|
|
return model.copy((i & 1) != 0 ? model.myId : j, (i & 2) != 0 ? model.guild : guild, (i & 4) != 0 ? model.userComputed : guildMember, (i & 8) != 0 ? model.userRoles : set, (i & 16) != 0 ? model.user : user, (i & 32) != 0 ? model.roleItems : list, (i & 64) != 0 ? model.canManage : z2, (i & 128) != 0 ? model.canKick : z3, (i & 256) != 0 ? model.canBan : z4, (i & 512) != 0 ? model.canChangeNickname : z5, (i & 1024) != 0 ? model.canTransferOwnership : z6);
|
|
}
|
|
|
|
public final long component1() {
|
|
return this.myId;
|
|
}
|
|
|
|
public final boolean component10() {
|
|
return this.canChangeNickname;
|
|
}
|
|
|
|
public final boolean component11() {
|
|
return this.canTransferOwnership;
|
|
}
|
|
|
|
public final Guild component2() {
|
|
return this.guild;
|
|
}
|
|
|
|
public final GuildMember component3() {
|
|
return this.userComputed;
|
|
}
|
|
|
|
public final Set<Long> component4() {
|
|
return this.userRoles;
|
|
}
|
|
|
|
public final User component5() {
|
|
return this.user;
|
|
}
|
|
|
|
public final List<WidgetServerSettingsEditMemberRolesAdapter.RoleItem> component6() {
|
|
return this.roleItems;
|
|
}
|
|
|
|
public final boolean component7() {
|
|
return this.canManage;
|
|
}
|
|
|
|
public final boolean component8() {
|
|
return this.canKick;
|
|
}
|
|
|
|
public final boolean component9() {
|
|
return this.canBan;
|
|
}
|
|
|
|
public final Model copy(long j, Guild guild, GuildMember guildMember, Set<Long> set, User user, List<WidgetServerSettingsEditMemberRolesAdapter.RoleItem> list, boolean z2, boolean z3, boolean z4, boolean z5, boolean z6) {
|
|
m.checkNotNullParameter(guild, "guild");
|
|
m.checkNotNullParameter(guildMember, "userComputed");
|
|
m.checkNotNullParameter(set, "userRoles");
|
|
m.checkNotNullParameter(user, "user");
|
|
m.checkNotNullParameter(list, "roleItems");
|
|
return new Model(j, guild, guildMember, set, user, list, z2, z3, z4, z5, z6);
|
|
}
|
|
|
|
public boolean equals(Object obj) {
|
|
if (this == obj) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof Model)) {
|
|
return false;
|
|
}
|
|
Model model = (Model) obj;
|
|
return this.myId == model.myId && m.areEqual(this.guild, model.guild) && m.areEqual(this.userComputed, model.userComputed) && m.areEqual(this.userRoles, model.userRoles) && m.areEqual(this.user, model.user) && m.areEqual(this.roleItems, model.roleItems) && this.canManage == model.canManage && this.canKick == model.canKick && this.canBan == model.canBan && this.canChangeNickname == model.canChangeNickname && this.canTransferOwnership == model.canTransferOwnership;
|
|
}
|
|
|
|
public final boolean getCanBan() {
|
|
return this.canBan;
|
|
}
|
|
|
|
public final boolean getCanChangeNickname() {
|
|
return this.canChangeNickname;
|
|
}
|
|
|
|
public final boolean getCanKick() {
|
|
return this.canKick;
|
|
}
|
|
|
|
public final boolean getCanManage() {
|
|
return this.canManage;
|
|
}
|
|
|
|
public final boolean getCanTransferOwnership() {
|
|
return this.canTransferOwnership;
|
|
}
|
|
|
|
public final Guild getGuild() {
|
|
return this.guild;
|
|
}
|
|
|
|
public final long getMyId() {
|
|
return this.myId;
|
|
}
|
|
|
|
public final List<WidgetServerSettingsEditMemberRolesAdapter.RoleItem> getRoleItems() {
|
|
return this.roleItems;
|
|
}
|
|
|
|
public final User getUser() {
|
|
return this.user;
|
|
}
|
|
|
|
public final GuildMember getUserComputed() {
|
|
return this.userComputed;
|
|
}
|
|
|
|
public final Set<Long> getUserRoles() {
|
|
return this.userRoles;
|
|
}
|
|
|
|
public int hashCode() {
|
|
int a = b.a(this.myId) * 31;
|
|
Guild guild = this.guild;
|
|
int i = 0;
|
|
int hashCode = (a + (guild != null ? guild.hashCode() : 0)) * 31;
|
|
GuildMember guildMember = this.userComputed;
|
|
int hashCode2 = (hashCode + (guildMember != null ? guildMember.hashCode() : 0)) * 31;
|
|
Set<Long> set = this.userRoles;
|
|
int hashCode3 = (hashCode2 + (set != null ? set.hashCode() : 0)) * 31;
|
|
User user = this.user;
|
|
int hashCode4 = (hashCode3 + (user != null ? user.hashCode() : 0)) * 31;
|
|
List<WidgetServerSettingsEditMemberRolesAdapter.RoleItem> list = this.roleItems;
|
|
if (list != null) {
|
|
i = list.hashCode();
|
|
}
|
|
int i2 = (hashCode4 + i) * 31;
|
|
boolean z2 = this.canManage;
|
|
int i3 = 1;
|
|
if (z2) {
|
|
z2 = true;
|
|
}
|
|
int i4 = z2 ? 1 : 0;
|
|
int i5 = z2 ? 1 : 0;
|
|
int i6 = z2 ? 1 : 0;
|
|
int i7 = (i2 + i4) * 31;
|
|
boolean z3 = this.canKick;
|
|
if (z3) {
|
|
z3 = true;
|
|
}
|
|
int i8 = z3 ? 1 : 0;
|
|
int i9 = z3 ? 1 : 0;
|
|
int i10 = z3 ? 1 : 0;
|
|
int i11 = (i7 + i8) * 31;
|
|
boolean z4 = this.canBan;
|
|
if (z4) {
|
|
z4 = true;
|
|
}
|
|
int i12 = z4 ? 1 : 0;
|
|
int i13 = z4 ? 1 : 0;
|
|
int i14 = z4 ? 1 : 0;
|
|
int i15 = (i11 + i12) * 31;
|
|
boolean z5 = this.canChangeNickname;
|
|
if (z5) {
|
|
z5 = true;
|
|
}
|
|
int i16 = z5 ? 1 : 0;
|
|
int i17 = z5 ? 1 : 0;
|
|
int i18 = z5 ? 1 : 0;
|
|
int i19 = (i15 + i16) * 31;
|
|
boolean z6 = this.canTransferOwnership;
|
|
if (!z6) {
|
|
i3 = z6 ? 1 : 0;
|
|
}
|
|
return i19 + i3;
|
|
}
|
|
|
|
public String toString() {
|
|
StringBuilder L = a.L("Model(myId=");
|
|
L.append(this.myId);
|
|
L.append(", guild=");
|
|
L.append(this.guild);
|
|
L.append(", userComputed=");
|
|
L.append(this.userComputed);
|
|
L.append(", userRoles=");
|
|
L.append(this.userRoles);
|
|
L.append(", user=");
|
|
L.append(this.user);
|
|
L.append(", roleItems=");
|
|
L.append(this.roleItems);
|
|
L.append(", canManage=");
|
|
L.append(this.canManage);
|
|
L.append(", canKick=");
|
|
L.append(this.canKick);
|
|
L.append(", canBan=");
|
|
L.append(this.canBan);
|
|
L.append(", canChangeNickname=");
|
|
L.append(this.canChangeNickname);
|
|
L.append(", canTransferOwnership=");
|
|
return a.G(L, this.canTransferOwnership, ")");
|
|
}
|
|
}
|
|
|
|
public WidgetServerSettingsEditMember() {
|
|
super(2131559160);
|
|
}
|
|
|
|
public static final /* synthetic */ void access$changeNickname(WidgetServerSettingsEditMember widgetServerSettingsEditMember, Model model, String str) {
|
|
widgetServerSettingsEditMember.changeNickname(model, str);
|
|
}
|
|
|
|
public static final /* synthetic */ void access$configureUI(WidgetServerSettingsEditMember widgetServerSettingsEditMember, Model model) {
|
|
widgetServerSettingsEditMember.configureUI(model);
|
|
}
|
|
|
|
public static final /* synthetic */ WidgetServerSettingsEditMemberBinding access$getBinding$p(WidgetServerSettingsEditMember widgetServerSettingsEditMember) {
|
|
return widgetServerSettingsEditMember.getBinding();
|
|
}
|
|
|
|
public static final /* synthetic */ void access$onNicknameChangeSuccessful(WidgetServerSettingsEditMember widgetServerSettingsEditMember, String str) {
|
|
widgetServerSettingsEditMember.onNicknameChangeSuccessful(str);
|
|
}
|
|
|
|
private final void changeNickname(Model model, String str) {
|
|
if (model.getUser().getId() == model.getMyId()) {
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().changeGuildNickname(model.getGuild().getId(), new RestAPIParams.Nick(str)), false, 1, null), this, null, 2, null), WidgetServerSettingsEditMember.class, requireContext(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetServerSettingsEditMember$changeNickname$1(this, str), 60, (Object) null);
|
|
} else {
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().changeGuildMember(model.getGuild().getId(), model.getUser().getId(), RestAPIParams.GuildMember.Companion.createWithNick(str)), false, 1, null), this, null, 2, null), WidgetServerSettingsEditMember.class, requireContext(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetServerSettingsEditMember$changeNickname$2(this, str), 60, (Object) null);
|
|
}
|
|
}
|
|
|
|
private final void configureUI(Model model) {
|
|
if (model == null || !model.getCanManage()) {
|
|
AppActivity appActivity = getAppActivity();
|
|
if (appActivity != null) {
|
|
appActivity.finish();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
int i = 0;
|
|
boolean z2 = true;
|
|
AppFragment.setActionBarDisplayHomeAsUpEnabled$default(this, false, 1, null);
|
|
Context context = getContext();
|
|
setActionBarTitle(context != null ? c.a.l.b.g(context, 2131889270, new Object[]{model.getGuild().getName()}, null, 4) : null);
|
|
GuildMember.Companion companion = GuildMember.Companion;
|
|
setActionBarSubtitle(companion.getNickOrUsername(model.getUserComputed(), model.getUser()));
|
|
setupNickname(model);
|
|
setupRoles(model);
|
|
this.state.configureSaveActionView(getBinding().h);
|
|
getBinding().h.setOnClickListener(new WidgetServerSettingsEditMember$configureUI$1(this, model));
|
|
String nickOrUsername = companion.getNickOrUsername(model.getUserComputed(), model.getUser());
|
|
if (model.getCanKick()) {
|
|
TextView textView = getBinding().d;
|
|
m.checkNotNullExpressionValue(textView, "binding.editMemberKickButton");
|
|
c.a.l.b.m(textView, 2131890833, new Object[]{nickOrUsername}, null, 4);
|
|
TextView textView2 = getBinding().d;
|
|
m.checkNotNullExpressionValue(textView2, "binding.editMemberKickButton");
|
|
textView2.setVisibility(0);
|
|
getBinding().d.setOnClickListener(new WidgetServerSettingsEditMember$configureUI$2(this, nickOrUsername, model));
|
|
} else {
|
|
TextView textView3 = getBinding().d;
|
|
m.checkNotNullExpressionValue(textView3, "binding.editMemberKickButton");
|
|
textView3.setVisibility(8);
|
|
getBinding().d.setOnClickListener(null);
|
|
}
|
|
if (model.getCanBan()) {
|
|
TextView textView4 = getBinding().f1883c;
|
|
m.checkNotNullExpressionValue(textView4, "binding.editMemberBanButton");
|
|
c.a.l.b.m(textView4, 2131886823, new Object[]{nickOrUsername}, null, 4);
|
|
TextView textView5 = getBinding().f1883c;
|
|
m.checkNotNullExpressionValue(textView5, "binding.editMemberBanButton");
|
|
textView5.setVisibility(0);
|
|
getBinding().f1883c.setOnClickListener(new WidgetServerSettingsEditMember$configureUI$3(this, nickOrUsername, model));
|
|
} else {
|
|
TextView textView6 = getBinding().f1883c;
|
|
m.checkNotNullExpressionValue(textView6, "binding.editMemberBanButton");
|
|
textView6.setVisibility(8);
|
|
getBinding().f1883c.setOnClickListener(null);
|
|
}
|
|
if (model.getCanTransferOwnership()) {
|
|
TextView textView7 = getBinding().i;
|
|
m.checkNotNullExpressionValue(textView7, "binding.editMemberTransferOwnershipButton");
|
|
textView7.setVisibility(0);
|
|
getBinding().i.setOnClickListener(new WidgetServerSettingsEditMember$configureUI$4(this, model));
|
|
} else {
|
|
TextView textView8 = getBinding().i;
|
|
m.checkNotNullExpressionValue(textView8, "binding.editMemberTransferOwnershipButton");
|
|
textView8.setVisibility(8);
|
|
getBinding().i.setOnClickListener(null);
|
|
}
|
|
LinearLayout linearLayout = getBinding().b;
|
|
m.checkNotNullExpressionValue(linearLayout, "binding.editMemberAdministrativeContainer");
|
|
if (!model.getCanKick() && !model.getCanBan() && !model.getCanTransferOwnership()) {
|
|
z2 = false;
|
|
}
|
|
if (!z2) {
|
|
i = 8;
|
|
}
|
|
linearLayout.setVisibility(i);
|
|
}
|
|
|
|
private final WidgetServerSettingsEditMemberBinding getBinding() {
|
|
return (WidgetServerSettingsEditMemberBinding) this.binding$delegate.getValue((Fragment) this, $$delegatedProperties[0]);
|
|
}
|
|
|
|
private final void onNicknameChangeSuccessful(String str) {
|
|
AppFragment.hideKeyboard$default(this, null, 1, null);
|
|
o.j(this, str.length() > 0 ? c.a.l.b.j(this, 2131891435, new Object[]{str}, null, 4) : c.a.l.b.j(this, 2131891436, new Object[0], null, 4), 0, 4);
|
|
}
|
|
|
|
private final void setupNickname(Model model) {
|
|
String nick = model.getUserComputed().getNick();
|
|
if (nick == null) {
|
|
nick = "";
|
|
}
|
|
if (model.getCanChangeNickname()) {
|
|
TextInputLayout textInputLayout = getBinding().e;
|
|
m.checkNotNullExpressionValue(textInputLayout, "binding.editMemberNickname");
|
|
textInputLayout.setEndIconVisible(false);
|
|
TextInputLayout textInputLayout2 = getBinding().e;
|
|
m.checkNotNullExpressionValue(textInputLayout2, "binding.editMemberNickname");
|
|
textInputLayout2.setEnabled(true);
|
|
} else {
|
|
TextInputLayout textInputLayout3 = getBinding().e;
|
|
m.checkNotNullExpressionValue(textInputLayout3, "binding.editMemberNickname");
|
|
textInputLayout3.setEndIconVisible(true);
|
|
TextInputLayout textInputLayout4 = getBinding().e;
|
|
m.checkNotNullExpressionValue(textInputLayout4, "binding.editMemberNickname");
|
|
textInputLayout4.setEnabled(false);
|
|
StatefulViews statefulViews = this.state;
|
|
TextInputLayout textInputLayout5 = getBinding().e;
|
|
m.checkNotNullExpressionValue(textInputLayout5, "binding.editMemberNickname");
|
|
statefulViews.put(textInputLayout5.getId(), nick);
|
|
}
|
|
TextInputLayout textInputLayout6 = getBinding().e;
|
|
m.checkNotNullExpressionValue(textInputLayout6, "binding.editMemberNickname");
|
|
StatefulViews statefulViews2 = this.state;
|
|
TextInputLayout textInputLayout7 = getBinding().e;
|
|
m.checkNotNullExpressionValue(textInputLayout7, "binding.editMemberNickname");
|
|
ViewExtensions.setText(textInputLayout6, (CharSequence) statefulViews2.get(textInputLayout7.getId(), nick));
|
|
}
|
|
|
|
private final void setupRoles(Model model) {
|
|
WidgetServerSettingsEditMemberRolesAdapter widgetServerSettingsEditMemberRolesAdapter;
|
|
LinearLayout linearLayout = getBinding().f;
|
|
m.checkNotNullExpressionValue(linearLayout, "binding.editMemberRolesContainer");
|
|
linearLayout.setVisibility(model.getRoleItems().isEmpty() ^ true ? 0 : 8);
|
|
if ((!model.getRoleItems().isEmpty()) && (widgetServerSettingsEditMemberRolesAdapter = this.rolesAdapter) != null) {
|
|
widgetServerSettingsEditMemberRolesAdapter.configure(model.getRoleItems(), new WidgetServerSettingsEditMember$setupRoles$1(this, model));
|
|
}
|
|
}
|
|
|
|
@Override // com.discord.app.AppFragment
|
|
public void onViewBound(View view) {
|
|
m.checkNotNullParameter(view, "view");
|
|
super.onViewBound(view);
|
|
setRetainInstance(true);
|
|
MGRecyclerAdapter.Companion companion = MGRecyclerAdapter.Companion;
|
|
RecyclerView recyclerView = getBinding().g;
|
|
m.checkNotNullExpressionValue(recyclerView, "binding.editMemberRolesRecycler");
|
|
this.rolesAdapter = (WidgetServerSettingsEditMemberRolesAdapter) companion.configure(new WidgetServerSettingsEditMemberRolesAdapter(recyclerView));
|
|
RecyclerView recyclerView2 = getBinding().g;
|
|
m.checkNotNullExpressionValue(recyclerView2, "binding.editMemberRolesRecycler");
|
|
recyclerView2.setNestedScrollingEnabled(false);
|
|
getBinding().g.setHasFixedSize(false);
|
|
this.state.setupUnsavedChangesConfirmation(this);
|
|
StatefulViews statefulViews = this.state;
|
|
TextInputLayout textInputLayout = getBinding().e;
|
|
m.checkNotNullExpressionValue(textInputLayout, "binding.editMemberNickname");
|
|
statefulViews.addOptionalFields(textInputLayout);
|
|
StatefulViews statefulViews2 = this.state;
|
|
FloatingActionButton floatingActionButton = getBinding().h;
|
|
TextInputLayout textInputLayout2 = getBinding().e;
|
|
m.checkNotNullExpressionValue(textInputLayout2, "binding.editMemberNickname");
|
|
statefulViews2.setupTextWatcherWithSaveAction(this, floatingActionButton, textInputLayout2);
|
|
}
|
|
|
|
@Override // com.discord.app.AppFragment
|
|
public void onViewBoundOrOnResume() {
|
|
super.onViewBoundOrOnResume();
|
|
long longExtra = getMostRecentIntent().getLongExtra("INTENT_EXTRA_GUILD_ID", -1);
|
|
long longExtra2 = getMostRecentIntent().getLongExtra("INTENT_EXTRA_USER_ID", -1);
|
|
StoreStream.Companion.getGuildSubscriptions().subscribeUser(longExtra, longExtra2);
|
|
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(Model.Companion.get(longExtra, longExtra2), this, null, 2, null), WidgetServerSettingsEditMember.class, (Context) null, (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetServerSettingsEditMember$onViewBoundOrOnResume$1(this), 62, (Object) null);
|
|
}
|
|
}
|