110.7 - Beta (110107)

This commit is contained in:
Juby210 2022-01-13 09:55:12 +01:00
parent 5e8949b048
commit 242ed9e2b7
15 changed files with 114 additions and 68 deletions

View file

@ -10,8 +10,8 @@ android {
applicationId 'com.discord'
minSdkVersion 21
targetSdkVersion 30
versionCode 110105
versionName "110.5 - Beta"
versionCode 110107
versionName "110.7 - Beta"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="110105" android:versionName="110.5 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="110107" android:versionName="110.7 - Beta" android:installLocation="auto" android:compileSdkVersion="30" android:compileSdkVersionCodename="11" package="com.discord" platformBuildVersionCode="30" platformBuildVersionName="11">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>
<uses-feature android:name="android.hardware.camera" android:required="false"/>
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false"/>

View file

@ -11,16 +11,29 @@ import com.discord.api.science.AnalyticsSchema;
import d0.z.d.m;
/* compiled from: TrackNetworkActionUserCommunicationDisabledUpdate.kt */
public final class TrackNetworkActionUserCommunicationDisabledUpdate implements AnalyticsSchema, TrackBaseReceiver, TrackLocationMetadataReceiver, TrackNetworkMetadataReceiver {
private final transient String analyticsSchemaTypeName = "network_action_user_communication_disabled_update";
private final Long communicationDisabledUntil = null;
private final Float duration = null;
private final Long guildId = null;
private final CharSequence reason = null;
private final Long targetUserId = null;
private final transient String analyticsSchemaTypeName;
private final Long communicationDisabledUntil;
private final Float duration;
private final Long guildId;
private final CharSequence reason;
private final Long targetUserId;
private TrackBase trackBase;
private TrackLocationMetadata trackLocationMetadata;
private TrackNetworkMetadata trackNetworkMetadata;
public TrackNetworkActionUserCommunicationDisabledUpdate() {
this(null, null, null, null, null);
}
public TrackNetworkActionUserCommunicationDisabledUpdate(Long l, Long l2, Float f, CharSequence charSequence, Long l3) {
this.guildId = l;
this.targetUserId = l2;
this.duration = f;
this.reason = charSequence;
this.communicationDisabledUntil = l3;
this.analyticsSchemaTypeName = "network_action_user_communication_disabled_update";
}
@Override // com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver
public void a(TrackNetworkMetadata trackNetworkMetadata) {
this.trackNetworkMetadata = trackNetworkMetadata;

View file

@ -405,7 +405,7 @@ public interface RestAPIInterface {
Observable<Void> disableAccount(@a RestAPIParams.DisableAccount disableAccount);
@n("guilds/{guildId}/members/{userId}")
Observable<Void> disableGuildCommunication(@s("guildId") long j, @s("userId") long j2, @a RestAPIParams.DisableGuildCommunication disableGuildCommunication, @i("X-Audit-Log-Reason") String str);
Observable<Response<Void>> disableGuildCommunication(@s("guildId") long j, @s("userId") long j2, @a RestAPIParams.DisableGuildCommunication disableGuildCommunication, @i("X-Audit-Log-Reason") String str);
@i0.f0.o("users/@me/mfa/totp/disable")
Observable<DisableMfaResponse> disableMFA(@a DisableMfaRequestBody disableMfaRequestBody);

View file

@ -2211,10 +2211,6 @@ public final class AnalyticsTracker {
tracker.track("local_settings_updated", g0.mapOf(o.to("notifications_in_app_enabled", Boolean.valueOf(z2))));
}
public final void userCommunicationDisabledUpdate(Long l, Long l2, Integer num, String str, String str2) {
tracker.track("user_communication_disabled_update", CollectionExtensionsKt.filterNonNullValues(h0.mapOf(o.to(ModelAuditLogEntry.CHANGE_KEY_GUILD_ID, l2), o.to("target_user_id", l), o.to("duration", num), o.to(ModelAuditLogEntry.CHANGE_KEY_GUILD_COMMUNICATION_DISABLED, str), o.to(ModelAuditLogEntry.CHANGE_KEY_REASON, str2))));
}
/* JADX WARNING: Removed duplicated region for block: B:14:0x003d */
/* JADX WARNING: Removed duplicated region for block: B:20:? A[RETURN, SYNTHETIC] */
public final void userListening(long j, Set<Long> set, String str, Channel channel) {

View file

@ -919,7 +919,7 @@ public final class RestAPI implements RestAPIInterface {
@Override // com.discord.restapi.RestAPIInterface
@i0.f0.n("guilds/{guildId}/members/{userId}")
public Observable<Void> disableGuildCommunication(@s("guildId") long j, @s("userId") long j2, @i0.f0.a RestAPIParams.DisableGuildCommunication disableGuildCommunication, @i("X-Audit-Log-Reason") String str) {
public Observable<Response<Void>> disableGuildCommunication(@s("guildId") long j, @s("userId") long j2, @i0.f0.a RestAPIParams.DisableGuildCommunication disableGuildCommunication, @i("X-Audit-Log-Reason") String str) {
m.checkNotNullParameter(disableGuildCommunication, "body");
return this._api.disableGuildCommunication(j, j2, disableGuildCommunication, str);
}

View file

@ -1,38 +1,26 @@
package com.discord.widgets.guildcommunicationdisabled.start;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionUserCommunicationDisabledUpdate;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: DisableGuildCommunicationViewModel.kt */
public final class DisableGuildCommunicationViewModel$onDisableCommunicationConfirm$1 extends o implements Function1<Void, Unit> {
public final /* synthetic */ String $communicationDisabledUntil;
public final class DisableGuildCommunicationViewModel$onDisableCommunicationConfirm$1 extends o implements Function1<Void, TrackNetworkMetadataReceiver> {
public final /* synthetic */ long $disabledUntilTimestamp;
public final /* synthetic */ long $durationS;
public final /* synthetic */ Function0 $onFinished;
public final /* synthetic */ String $reason;
public final /* synthetic */ DisableGuildCommunicationViewModel this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public DisableGuildCommunicationViewModel$onDisableCommunicationConfirm$1(DisableGuildCommunicationViewModel disableGuildCommunicationViewModel, Function0 function0, long j, String str, String str2) {
public DisableGuildCommunicationViewModel$onDisableCommunicationConfirm$1(DisableGuildCommunicationViewModel disableGuildCommunicationViewModel, long j, long j2, String str) {
super(1);
this.this$0 = disableGuildCommunicationViewModel;
this.$onFinished = function0;
this.$durationS = j;
this.$communicationDisabledUntil = str;
this.$reason = str2;
this.$disabledUntilTimestamp = j2;
this.$reason = str;
}
/* 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(Void r1) {
invoke(r1);
return Unit.a;
}
public final void invoke(Void r7) {
this.$onFinished.mo1invoke();
AnalyticsTracker.INSTANCE.userCommunicationDisabledUpdate(Long.valueOf(DisableGuildCommunicationViewModel.access$getUserId$p(this.this$0)), Long.valueOf(DisableGuildCommunicationViewModel.access$getGuildId$p(this.this$0)), Integer.valueOf((int) this.$durationS), this.$communicationDisabledUntil, this.$reason);
public final TrackNetworkMetadataReceiver invoke(Void r7) {
return new TrackNetworkActionUserCommunicationDisabledUpdate(Long.valueOf(DisableGuildCommunicationViewModel.access$getGuildId$p(this.this$0)), Long.valueOf(DisableGuildCommunicationViewModel.access$getUserId$p(this.this$0)), Float.valueOf((float) this.$durationS), this.$reason, Long.valueOf(this.$disabledUntilTimestamp));
}
}

View file

@ -0,0 +1,28 @@
package com.discord.widgets.guildcommunicationdisabled.start;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
/* compiled from: DisableGuildCommunicationViewModel.kt */
public final class DisableGuildCommunicationViewModel$onDisableCommunicationConfirm$2 extends o implements Function1<Void, Unit> {
public final /* synthetic */ Function0 $onFinished;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public DisableGuildCommunicationViewModel$onDisableCommunicationConfirm$2(Function0 function0) {
super(1);
this.$onFinished = function0;
}
/* 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(Void r1) {
invoke(r1);
return Unit.a;
}
public final void invoke(Void r1) {
this.$onFinished.mo1invoke();
}
}

View file

@ -12,11 +12,13 @@ import com.discord.stores.StoreStream;
import com.discord.stores.StoreUser;
import com.discord.stores.updates.ObservationDeck;
import com.discord.stores.updates.ObservationDeckProvider;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.rest.RestAPI;
import com.discord.utilities.rx.ObservableExtensionsKt;
import d0.z.d.k;
import d0.z.d.m;
import java.lang.ref.WeakReference;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
@ -309,9 +311,9 @@ public final class DisableGuildCommunicationViewModel extends AppViewModel<ViewS
ViewState viewState = getViewState();
if (viewState instanceof ViewState.Valid) {
ViewState.Valid valid = (ViewState.Valid) viewState;
String futureTimestamp = GuildCommunicationDisabledDateUtils.INSTANCE.getFutureTimestamp(valid.getSelectedDurationOption().getDurationMs());
long durationMs = ((long) valid.getSelectedDurationOption().getDurationMs()) / 1000;
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().disableGuildCommunication(this.guildId, this.userId, new RestAPIParams.DisableGuildCommunication(futureTimestamp), str), false, 1, null), this, null, 2, null), DisableGuildCommunicationViewModel.class, weakReference.get(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new DisableGuildCommunicationViewModel$onDisableCommunicationConfirm$1(this, function0, durationMs, futureTimestamp, str), 60, (Object) null);
Pair<String, Long> futureTimestamp = GuildCommunicationDisabledDateUtils.INSTANCE.getFutureTimestamp(valid.getSelectedDurationOption().getDurationMs());
long longValue = futureTimestamp.component2().longValue();
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(RestCallStateKt.logNetworkAction(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApi().disableGuildCommunication(this.guildId, this.userId, new RestAPIParams.DisableGuildCommunication(futureTimestamp.component1()), str), false, 1, null), new DisableGuildCommunicationViewModel$onDisableCommunicationConfirm$1(this, ((long) valid.getSelectedDurationOption().getDurationMs()) / 1000, longValue, str)), this, null, 2, null), DisableGuildCommunicationViewModel.class, weakReference.get(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new DisableGuildCommunicationViewModel$onDisableCommunicationConfirm$2(function0), 60, (Object) null);
}
}

View file

@ -8,6 +8,7 @@ import com.discord.utilities.time.TimeUtils;
import d0.z.d.m;
import java.util.Calendar;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Pair;
/* compiled from: GuildCommunicationDisabledDateUtils.kt */
public final class GuildCommunicationDisabledDateUtils {
public static final GuildCommunicationDisabledDateUtils INSTANCE = new GuildCommunicationDisabledDateUtils();
@ -61,10 +62,11 @@ public final class GuildCommunicationDisabledDateUtils {
throw new NoWhenBranchMatchedException();
}
public final String getFutureTimestamp(int i) {
public final Pair<String, Long> getFutureTimestamp(int i) {
Calendar instance = Calendar.getInstance();
instance.add(14, i);
m.checkNotNullExpressionValue(instance, "date");
return a.v(TimeUtils.toUTCDateTime(Long.valueOf(instance.getTimeInMillis()), TimeUtils.UTCFormat.LONG), ".000Z");
long timeInMillis = instance.getTimeInMillis();
return new Pair<>(a.v(TimeUtils.toUTCDateTime(Long.valueOf(timeInMillis), TimeUtils.UTCFormat.LONG), ".000Z"), Long.valueOf(timeInMillis));
}
}

View file

@ -1,40 +1,22 @@
package com.discord.widgets.guildcommunicationdisabled.start;
import android.content.Context;
import b.a.d.m;
import b.a.k.b;
import com.discord.R;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.analytics.generated.events.network_action.TrackNetworkActionUserCommunicationDisabledUpdate;
import com.discord.analytics.generated.traits.TrackNetworkMetadataReceiver;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetEnableGuildCommunication.kt */
public final class WidgetEnableGuildCommunication$handleEnableGuildCommunication$1 extends o implements Function1<Void, Unit> {
public final class WidgetEnableGuildCommunication$handleEnableGuildCommunication$1 extends o implements Function1<Void, TrackNetworkMetadataReceiver> {
public final /* synthetic */ long $guildId;
public final /* synthetic */ long $userId;
public final /* synthetic */ WidgetEnableGuildCommunication this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetEnableGuildCommunication$handleEnableGuildCommunication$1(WidgetEnableGuildCommunication widgetEnableGuildCommunication, long j, long j2) {
public WidgetEnableGuildCommunication$handleEnableGuildCommunication$1(long j, long j2) {
super(1);
this.this$0 = widgetEnableGuildCommunication;
this.$guildId = j;
this.$userId = j2;
}
/* 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(Void r1) {
invoke(r1);
return Unit.a;
}
public final void invoke(Void r11) {
this.this$0.dismiss();
Context context = this.this$0.getContext();
Context context2 = this.this$0.getContext();
m.h(context, context2 != null ? b.h(context2, R.string.guild_enable_communication_success, new Object[0], null, 4) : null, 0, null, 12);
AnalyticsTracker.INSTANCE.userCommunicationDisabledUpdate(Long.valueOf(this.$guildId), Long.valueOf(this.$userId), null, null, null);
public final TrackNetworkMetadataReceiver invoke(Void r7) {
return new TrackNetworkActionUserCommunicationDisabledUpdate(Long.valueOf(this.$guildId), Long.valueOf(this.$userId), null, null, null);
}
}

View file

@ -0,0 +1,34 @@
package com.discord.widgets.guildcommunicationdisabled.start;
import android.content.Context;
import b.a.d.m;
import b.a.k.b;
import com.discord.R;
import d0.z.d.o;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
/* compiled from: WidgetEnableGuildCommunication.kt */
public final class WidgetEnableGuildCommunication$handleEnableGuildCommunication$2 extends o implements Function1<Void, Unit> {
public final /* synthetic */ WidgetEnableGuildCommunication this$0;
/* JADX INFO: super call moved to the top of the method (can break code semantics) */
public WidgetEnableGuildCommunication$handleEnableGuildCommunication$2(WidgetEnableGuildCommunication widgetEnableGuildCommunication) {
super(1);
this.this$0 = widgetEnableGuildCommunication;
}
/* 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(Void r1) {
invoke(r1);
return Unit.a;
}
public final void invoke(Void r7) {
this.this$0.dismiss();
Context context = this.this$0.getContext();
Context context2 = this.this$0.getContext();
m.h(context, context2 != null ? b.h(context2, R.string.guild_enable_communication_success, new Object[0], null, 4) : null, 0, null, 12);
}
}

View file

@ -18,6 +18,7 @@ import com.discord.models.user.User;
import com.discord.restapi.RestAPIParams;
import com.discord.stores.StoreStream;
import com.discord.stores.StoreUser;
import com.discord.stores.utilities.RestCallStateKt;
import com.discord.utilities.analytics.AnalyticsTracker;
import com.discord.utilities.duration.DurationUtilsKt;
import com.discord.utilities.rest.RestAPI;
@ -100,7 +101,7 @@ public final class WidgetEnableGuildCommunication extends AppDialog {
}
private final void handleEnableGuildCommunication(long j, long j2) {
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApiSerializeNulls().disableGuildCommunication(j, j2, new RestAPIParams.DisableGuildCommunication(null), null), false, 1, null), this, null, 2, null), WidgetEnableGuildCommunication.class, getContext(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetEnableGuildCommunication$handleEnableGuildCommunication$1(this, j, j2), 60, (Object) null);
ObservableExtensionsKt.appSubscribe$default(ObservableExtensionsKt.ui$default(RestCallStateKt.logNetworkAction(ObservableExtensionsKt.restSubscribeOn$default(RestAPI.Companion.getApiSerializeNulls().disableGuildCommunication(j, j2, new RestAPIParams.DisableGuildCommunication(null), null), false, 1, null), new WidgetEnableGuildCommunication$handleEnableGuildCommunication$1(j, j2)), this, null, 2, null), WidgetEnableGuildCommunication.class, getContext(), (Function1) null, (Function1) null, (Function0) null, (Function0) null, new WidgetEnableGuildCommunication$handleEnableGuildCommunication$2(this), 60, (Object) null);
}
public static final void launch(long j, long j2, FragmentManager fragmentManager) {

View file

@ -346,7 +346,7 @@ public final class WidgetSettings extends AppFragment implements OnTabSelectedLi
TextView textView = binding.f;
m.checkNotNullExpressionValue(textView, "appInfoHeader");
String string = getString(R.string.app_information);
textView.setText(string + " - 110.5 - Beta (110105)");
textView.setText(string + " - 110.7 - Beta (110107)");
binding.B.setOnClickListener(new WidgetSettings$onViewBound$$inlined$with$lambda$3(this));
binding.u.setOnClickListener(WidgetSettings$onViewBound$1$5.INSTANCE);
binding.q.setOnClickListener(WidgetSettings$onViewBound$1$6.INSTANCE);

View file

@ -1444,7 +1444,7 @@
<string name="color_picker_custom">Custom</string>
<string name="color_picker_presets">Presets</string>
<string name="color_picker_use_default">Use Default</string>
<string name="res_2131887607_com_crashlytics_android_build_id">815befbf1cd34498a6ce49bad893e3a2</string>
<string name="res_2131887607_com_crashlytics_android_build_id">4a4fa205e79049e08933e56bb9838153</string>
<string name="command_accessibility_desc_app_header_item">Slash command application {applicationName}</string>
<string name="command_accessibility_desc_app_item">{applicationName} application</string>
<string name="command_accessibility_desc_app_item_selected">{applicationName} application selected</string>