正在查看: Biko v2.0.23 应用的 StreamerDetailActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Biko v2.0.23 应用的 StreamerDetailActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package app.callpe.ui.home;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.media.MediaPlayer;
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.activity.ComponentActivity;
import androidx.activity.result.ActivityResult;
import androidx.activity.result.ActivityResultCallback;
import androidx.activity.result.ActivityResultLauncher;
import androidx.activity.result.contract.ActivityResultContract;
import androidx.activity.result.contract.ActivityResultContracts;
import androidx.appcompat.widget.AppCompatImageView;
import androidx.core.content.ContextCompat;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.LifecycleOwner;
import androidx.lifecycle.LifecycleOwnerKt;
import androidx.lifecycle.ViewModelLazy;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.viewmodel.CreationExtras;
import androidx.media3.common.MediaItem;
import androidx.media3.common.Player;
import androidx.media3.exoplayer.DefaultRenderersFactory;
import androidx.media3.exoplayer.ExoPlayer;
import androidx.media3.exoplayer.RenderersFactory;
import androidx.media3.exoplayer.mediacodec.MediaCodecSelector;
import androidx.media3.exoplayer.source.MediaSource;
import androidx.media3.exoplayer.source.ProgressiveMediaSource;
import androidx.recyclerview.widget.RecyclerView;
import androidx.viewpager2.adapter.FragmentStateAdapter;
import androidx.viewpager2.widget.ViewPager2;
import app.callpe.App;
import app.callpe.adapters.ProfileViewAdapter;
import app.callpe.common.utils.Constants;
import app.callpe.common.utils.DateHelper;
import app.callpe.common.utils.Helper;
import app.callpe.common.utils.custom.mediaslider.MediaSliderActivity;
import app.callpe.common.utils.extensions.ActivityExtKt;
import app.callpe.common.utils.extensions.NumberExtKt;
import app.callpe.common.utils.extensions.ViewExtKt;
import app.callpe.common.utils.helper_functions.CacheDataSourceFactorySingleton;
import app.callpe.common.utils.helper_functions.DialogHelper;
import app.callpe.common.utils.sharedpref.PrefKeys;
import app.callpe.common.utils.sharedpref.SharedPref;
import app.callpe.data.model.Balance;
import app.callpe.data.model.LevelDetails;
import app.callpe.data.model.MediaFile;
import app.callpe.data.model.Review;
import app.callpe.data.model.ReviewDetails;
import app.callpe.data.model.StreamerModel;
import app.callpe.databinding.ActivityStreamerDetailBinding;
import app.callpe.ui.SplashActivity;
import app.callpe.ui.bottomsheet.CallSheet;
import app.callpe.ui.bottomsheet.StreamerDetailBottomSheet;
import app.callpe.ui.bottomsheet.UnblockRequestBottomSheet;
import app.callpe.ui.call.CallActivity;
import app.callpe.ui.chat.ChatActivity;
import app.callpe.ui.dialog.RechargeDialog;
import app.callpe.ui.home.profileTabFragments.BioFragment;
import app.callpe.ui.home.profileTabFragments.PhotosFragment;
import app.callpe.ui.home.profileTabFragments.VideoFragment;
import app.callpe.ui.login.LoginActivity;
import app.callpe.ui.misc.ImageShowActivity;
import app.callpe.ui.user.UserViewModel;
import com.birjuvachhani.locus.R;
import com.bumptech.glide.Glide;
import com.facebook.internal.AnalyticsEvents;
import com.facebook.internal.NativeProtocol;
import com.google.android.material.tabs.TabLayout;
import com.google.android.material.tabs.TabLayoutMediator;
import com.google.gson.Gson;
import com.permissionx.guolindev.PermissionX;
import com.permissionx.guolindev.callback.ExplainReasonCallback;
import com.permissionx.guolindev.callback.ForwardToSettingsCallback;
import com.permissionx.guolindev.callback.RequestCallback;
import com.permissionx.guolindev.request.ExplainScope;
import com.permissionx.guolindev.request.ForwardScope;
import dagger.hilt.android.AndroidEntryPoint;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import kotlin.Lazy;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.coroutines.CoroutineContext;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.CoroutineStart;
import kotlinx.coroutines.Job;
import timber.log.Timber;
@Metadata(d1 = {"\u0000Ö\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\f\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0010!\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0007\u0018\u0000 y2\b\u0012\u0004\u0012\u00020\u00020\u0001:\u0002yzB\u0005¢\u0006\u0002\u0010\u0003J\b\u0010;\u001a\u00020<H\u0002J\b\u0010=\u001a\u00020>H\u0002J\u0018\u0010?\u001a\u00020>2\u0006\u0010@\u001a\u00020A2\u0006\u0010B\u001a\u00020CH\u0002J\u0010\u0010D\u001a\u00020\u00022\u0006\u0010E\u001a\u00020FH\u0016J\b\u0010G\u001a\u00020HH\u0002J\b\u0010I\u001a\u00020>H\u0016J\b\u0010J\u001a\u00020>H\u0002J\u0012\u0010K\u001a\u00020>2\b\u0010L\u001a\u0004\u0018\u00010MH\u0014J\b\u0010N\u001a\u00020>H\u0014J\u0012\u0010O\u001a\u00020>2\b\u0010P\u001a\u0004\u0018\u00010\u0017H\u0014J\u0010\u0010Q\u001a\u00020\t2\u0006\u0010R\u001a\u00020SH\u0016J\b\u0010T\u001a\u00020>H\u0014J(\u0010U\u001a\u00020>2\u0006\u0010V\u001a\u00020%2\u0016\u0010W\u001a\u0012\u0012\u0004\u0012\u00020Y0Xj\b\u0012\u0004\u0012\u00020Y`ZH\u0002J\b\u0010[\u001a\u00020>H\u0002J\b\u0010\\\u001a\u00020>H\u0002J \u0010]\u001a\u00020>2\f\u0010\u001f\u001a\b\u0012\u0004\u0012\u00020!0 2\b\u0010^\u001a\u0004\u0018\u00010_H\u0002J\b\u0010`\u001a\u00020>H\u0002J\u0010\u0010a\u001a\u00020>2\u0006\u0010@\u001a\u00020AH\u0002J\u0012\u0010b\u001a\u00020>2\b\u0010c\u001a\u0004\u0018\u00010dH\u0002J \u0010e\u001a\u00020>2\u0016\u0010f\u001a\u0012\u0012\u0004\u0012\u00020!0Xj\b\u0012\u0004\u0012\u00020!`ZH\u0002J \u0010g\u001a\u00020>2\u0016\u0010h\u001a\u0012\u0012\u0004\u0012\u00020!0Xj\b\u0012\u0004\u0012\u00020!`ZH\u0002J\u0016\u0010i\u001a\u00020>2\f\u0010j\u001a\b\u0012\u0004\u0012\u00020k0 H\u0002J\b\u0010l\u001a\u00020>H\u0002J\u0018\u0010m\u001a\u00020>2\u0006\u0010n\u001a\u00020A2\u0006\u0010B\u001a\u00020CH\u0002J\b\u0010o\u001a\u00020>H\u0002J\u0018\u0010p\u001a\u00020>2\u0006\u0010@\u001a\u00020A2\u0006\u0010B\u001a\u00020CH\u0002J\u0010\u0010q\u001a\u00020>2\u0006\u0010r\u001a\u00020!H\u0007J\b\u0010s\u001a\u00020>H\u0002J\u0010\u0010t\u001a\u00020>2\u0006\u0010n\u001a\u00020AH\u0002J\u0010\u0010u\u001a\u00020>2\u0006\u0010@\u001a\u00020AH\u0002J\b\u0010v\u001a\u00020>H\u0002J\u0010\u0010w\u001a\u00020>2\u0006\u0010n\u001a\u00020xH\u0002R\u0010\u0010\u0004\u001a\u0004\u0018\u00010\u0005X\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082.¢\u0006\u0002\n\u0000R\u001a\u0010\b\u001a\u00020\tX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\n\u0010\u000b\"\u0004\b\f\u0010\rR\u001a\u0010\u000e\u001a\u00020\tX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u000f\u0010\u000b\"\u0004\b\u0010\u0010\rR\u000e\u0010\u0011\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u000e\u0010\u0012\u001a\u00020\tX\u0082\u000e¢\u0006\u0002\n\u0000R\u001a\u0010\u0013\u001a\u00020\tX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0013\u0010\u000b\"\u0004\b\u0014\u0010\rR\u001c\u0010\u0015\u001a\u0010\u0012\f\u0012\n \u0018*\u0004\u0018\u00010\u00170\u00170\u0016X\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u0019\u001a\u0004\u0018\u00010\u001aX\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u001b\u001a\u0004\u0018\u00010\u001cX\u0082\u000e¢\u0006\u0002\n\u0000R\u0010\u0010\u001d\u001a\u0004\u0018\u00010\u001eX\u0082\u000e¢\u0006\u0002\n\u0000R\u0017\u0010\u001f\u001a\b\u0012\u0004\u0012\u00020!0 ¢\u0006\b\n\u0000\u001a\u0004\b\"\u0010#R\u001a\u0010$\u001a\u00020%X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b&\u0010'\"\u0004\b(\u0010)R\u0019\u0010*\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010!0+¢\u0006\b\n\u0000\u001a\u0004\b,\u0010#R\u001a\u0010-\u001a\u00020\tX\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b.\u0010\u000b\"\u0004\b/\u0010\rR\u001a\u00100\u001a\u00020%X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b1\u0010'\"\u0004\b2\u0010)R\u001b\u00103\u001a\u0002048BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b7\u00108\u001a\u0004\b5\u00106R\u0010\u00109\u001a\u0004\u0018\u00010:X\u0082\u000e¢\u0006\u0002\n\u0000¨\u0006{"}, d2 = {"Lapp/callpe/ui/home/StreamerDetailActivity;", "Lapp/callpe/ui/home/BaseActivity;", "Lapp/callpe/databinding/ActivityStreamerDetailBinding;", "()V", "adapter", "Lapp/callpe/adapters/ProfileViewAdapter;", "exoPlayer", "Landroidx/media3/exoplayer/ExoPlayer;", "firstRechargeDone", "", "getFirstRechargeDone", "()Z", "setFirstRechargeDone", "(Z)V", "hideCallRate", "getHideCallRate", "setHideCallRate", "hideStreamerPics", "isPaymentAppMode", "isVip", "setVip", "launcher", "Landroidx/activity/result/ActivityResultLauncher;", "Landroid/content/Intent;", "kotlin.jvm.PlatformType", "mTabLayout", "Lcom/google/android/material/tabs/TabLayout;", "mViewPagerAdapter", "Lapp/callpe/ui/home/StreamerDetailActivity$ViewPager2Adapter;", "mediaSource", "Landroidx/media3/exoplayer/source/MediaSource;", NativeProtocol.RESULT_ARGS_PERMISSIONS, "", "", "getPermissions", "()Ljava/util/List;", "premiumUserWalletBalance", "", "getPremiumUserWalletBalance", "()I", "setPremiumUserWalletBalance", "(I)V", "selectedPictures", "", "getSelectedPictures", "showVipPlan", "getShowVipPlan", "setShowVipPlan", "unblockRequestCharge", "getUnblockRequestCharge", "setUnblockRequestCharge", "viewModel", "Lapp/callpe/ui/user/UserViewModel;", "getViewModel", "()Lapp/callpe/ui/user/UserViewModel;", "viewModel$delegate", "Lkotlin/Lazy;", "viewPager", "Landroidx/viewpager2/widget/ViewPager2;", "getContext", "Landroid/content/Context;", "getStreamer", "", "handlePaymentListingMode", "streamer", "Lapp/callpe/data/model/StreamerModel;", "userBalance", "Lapp/callpe/data/model/Balance;", "inflateLayout", "layoutInflater", "Landroid/view/LayoutInflater;", "observeEvent", "Lkotlinx/coroutines/Job;", "onBackPressed", "onClicks", "onCreate", "savedInstanceState", "Landroid/os/Bundle;", "onDestroy", "onNewIntent", "intent", "onOptionsItemSelected", "item", "Landroid/view/MenuItem;", "onResume", "openImageVideoSlider", "startPosition", "mediaList", "Ljava/util/ArrayList;", "Lapp/callpe/data/model/MediaFile;", "Lkotlin/collections/ArrayList;", "playMessageSentSound", "refresh", "requestPermissionIfNeeded", "requestCallback", "Lcom/permissionx/guolindev/callback/RequestCallback;", "setCallBtnBehaviour", "setFragmentData", "setRatings", "review", "Lapp/callpe/data/model/ReviewDetails;", "setStreamerInterestTag", "interests", "setStreamerLanguage", "languages", "setStreamerTags", "reviewTags", "Lapp/callpe/data/model/Review;", "setTabIcons", "setUpForbiddenCases", "data", "setUpNavigation", "setUpValues", "setVideoPath", "url", "shineAnimation", "showDialogue", "showNotifyOnWhatsAppDialog", "swipeRefresh", "updateFirstRecharge", "Lapp/callpe/data/model/Metadata;", "Companion", "ViewPager2Adapter", "app_bikoRelease"}, k = 1, mv = {1, 8, 0}, xi = 48)
@AndroidEntryPoint
public final class StreamerDetailActivity extends BaseActivity<ActivityStreamerDetailBinding> {
public static final Companion INSTANCE = new Companion(null);
private static boolean refresh;
private ProfileViewAdapter adapter;
private ExoPlayer exoPlayer;
private boolean firstRechargeDone;
private boolean hideCallRate;
private boolean hideStreamerPics;
private boolean isPaymentAppMode;
private boolean isVip;
private ActivityResultLauncher<Intent> launcher;
private TabLayout mTabLayout;
private ViewPager2Adapter mViewPagerAdapter;
private MediaSource mediaSource;
private boolean showVipPlan;
private final Lazy viewModel;
private ViewPager2 viewPager;
private final List<String> selectedPictures = new ArrayList();
private int unblockRequestCharge = 10;
private int premiumUserWalletBalance = 200;
private final List<String> permissions = CollectionsKt.listOf(new String[]{"android.permission.CAMERA", "android.permission.RECORD_AUDIO"});
private final void setRatings(ReviewDetails review) {
}
private final void setStreamerInterestTag(ArrayList<String> interests) {
}
private final void setStreamerLanguage(ArrayList<String> languages) {
}
private final void setStreamerTags(List<Review> reviewTags) {
}
private final void swipeRefresh() {
}
public StreamerDetailActivity() {
final ComponentActivity componentActivity = (ComponentActivity) this;
final Function0 function0 = null;
this.viewModel = new ViewModelLazy(Reflection.getOrCreateKotlinClass(UserViewModel.class), new Function0<ViewModelStore>() {
{
super(0);
}
public final ViewModelStore m1442invoke() {
return componentActivity.getViewModelStore();
}
}, new Function0<ViewModelProvider.Factory>() {
{
super(0);
}
public final ViewModelProvider.Factory m1441invoke() {
return componentActivity.getDefaultViewModelProviderFactory();
}
}, new Function0<CreationExtras>() {
{
super(0);
}
public final CreationExtras m1443invoke() {
CreationExtras creationExtras;
Function0 function02 = function0;
return (function02 == null || (creationExtras = (CreationExtras) function02.invoke()) == null) ? componentActivity.getDefaultViewModelCreationExtras() : creationExtras;
}
});
ActivityResultLauncher<Intent> registerForActivityResult = registerForActivityResult((ActivityResultContract) new ActivityResultContracts.StartActivityForResult(), new ActivityResultCallback() {
public final void onActivityResult(Object obj) {
StreamerDetailActivity.launcher$lambda$31(StreamerDetailActivity.this, (ActivityResult) obj);
}
});
Intrinsics.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul…refresh()\n }\n }");
this.launcher = registerForActivityResult;
}
public final UserViewModel getViewModel() {
return (UserViewModel) this.viewModel.getValue();
}
public final List<String> getSelectedPictures() {
return this.selectedPictures;
}
public final boolean getFirstRechargeDone() {
return this.firstRechargeDone;
}
public final void setFirstRechargeDone(boolean z) {
this.firstRechargeDone = z;
}
public final boolean getHideCallRate() {
return this.hideCallRate;
}
public final void setHideCallRate(boolean z) {
this.hideCallRate = z;
}
public final boolean getShowVipPlan() {
return this.showVipPlan;
}
public final void setShowVipPlan(boolean z) {
this.showVipPlan = z;
}
public final boolean getIsVip() {
return this.isVip;
}
public final void setVip(boolean z) {
this.isVip = z;
}
public final int getUnblockRequestCharge() {
return this.unblockRequestCharge;
}
public final void setUnblockRequestCharge(int i) {
this.unblockRequestCharge = i;
}
public final int getPremiumUserWalletBalance() {
return this.premiumUserWalletBalance;
}
public final void setPremiumUserWalletBalance(int i) {
this.premiumUserWalletBalance = i;
}
public final List<String> getPermissions() {
return this.permissions;
}
protected void onNewIntent(Intent intent) {
super.onNewIntent(intent);
setIntent(intent);
getStreamer();
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setWindowFlag((Activity) this, 67108864, false);
getWindow().setStatusBarColor(ContextCompat.getColor((Context) this, 2131100053));
swipeRefresh();
getStreamer();
observeEvent();
setUpNavigation();
onClicks();
}
private final void shineAnimation() {
final View view = ((ActivityStreamerDetailBinding) getBinding()).shine;
Intrinsics.checkNotNullExpressionValue(view, "binding.shine");
try {
final Animation loadAnimation = AnimationUtils.loadAnimation((Context) this, 2130772008);
view.startAnimation(loadAnimation);
loadAnimation.setAnimationListener(new Animation.AnimationListener() {
@Override
public void onAnimationRepeat(Animation p0) {
}
@Override
public void onAnimationStart(Animation p0) {
}
@Override
public void onAnimationEnd(Animation p0) {
BuildersKt.launch$default(LifecycleOwnerKt.getLifecycleScope(StreamerDetailActivity.this), (CoroutineContext) null, (CoroutineStart) null, new StreamerDetailActivity$shineAnimation$1$onAnimationEnd$1(view, loadAnimation, null), 3, (Object) null);
}
});
} catch (Exception e) {
Timber.e("Error: " + e, new Object[0]);
RelativeLayout relativeLayout = ((ActivityStreamerDetailBinding) getBinding()).shineRL;
Intrinsics.checkNotNullExpressionValue(relativeLayout, "binding.shineRL");
relativeLayout.setVisibility(8);
}
}
public final void handlePaymentListingMode(final StreamerModel streamer, final Balance userBalance) {
String str;
if (this.isPaymentAppMode) {
View view = getBinding().messageBtn;
Intrinsics.checkNotNullExpressionValue(view, "binding.messageBtn");
view.setVisibility(8);
AppCompatImageView appCompatImageView = getBinding().callButton;
Intrinsics.checkNotNullExpressionValue(appCompatImageView, "binding.callButton");
((View) appCompatImageView).setVisibility(8);
if (this.isVip) {
str = "Voice Call " + NumberExtKt.formatByNumberRupee$default(streamer.getAudioVipRate(), false, 1, (Object) null) + "/min";
} else {
str = "Voice Call " + NumberExtKt.formatByNumberRupee$default(streamer.getAudioUserRate(), false, 1, (Object) null) + "/min";
}
if (this.hideCallRate) {
str = "Voice Call";
}
getBinding().tv11.setText(str);
getBinding().videoCallBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view2) {
StreamerDetailActivity.handlePaymentListingMode$lambda$2(StreamerDetailActivity.this, userBalance, streamer, view2);
}
});
}
}
public static final void handlePaymentListingMode$lambda$2(final StreamerDetailActivity streamerDetailActivity, Balance balance, final StreamerModel streamerModel, View view) {
double audioUserRate;
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(balance, "$userBalance");
Intrinsics.checkNotNullParameter(streamerModel, "$streamer");
if (streamerDetailActivity.hideCallRate && !streamerDetailActivity.firstRechargeDone) {
try {
RechargeDialog rechargeDialog = new RechargeDialog(null, balance, null, streamerDetailActivity.getString(2131952498), null, new Function0<Unit>() {
public final void m1444invoke() {
}
public Object invoke() {
m1444invoke();
return Unit.INSTANCE;
}
}, new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m1445invoke();
return Unit.INSTANCE;
}
public final void m1445invoke() {
UserViewModel viewModel;
viewModel = StreamerDetailActivity.this.getViewModel();
UserViewModel.getUserDetails$default(viewModel, false, 1, null);
}
});
rechargeDialog.setCancelable(true);
if (!rechargeDialog.isAdded() && !rechargeDialog.isVisible()) {
rechargeDialog.show(streamerDetailActivity.getSupportFragmentManager(), "RechargeDialog");
return;
}
return;
} catch (Exception unused) {
String string = streamerDetailActivity.getString(2131951993);
Intrinsics.checkNotNullExpressionValue(string, "getString(R.string.error_unknown)");
ActivityExtKt.toast((Activity) streamerDetailActivity, string);
return;
}
}
try {
if (streamerDetailActivity.isVip) {
audioUserRate = streamerModel.getAudioVipRate();
} else {
audioUserRate = streamerModel.getAudioUserRate();
}
if (balance.getBalance() >= audioUserRate) {
streamerDetailActivity.requestPermissionIfNeeded(streamerDetailActivity.permissions, new RequestCallback() {
public final void onResult(boolean z, List list, List list2) {
StreamerDetailActivity.handlePaymentListingMode$lambda$2$lambda$1(StreamerModel.this, streamerDetailActivity, z, list, list2);
}
});
return;
}
try {
RechargeDialog rechargeDialog2 = new RechargeDialog(null, balance, StreamerModel.getProfile$default(streamerModel, false, 1, null), null, Double.valueOf(audioUserRate), new Function0<Unit>() {
public final void m1446invoke() {
}
public Object invoke() {
m1446invoke();
return Unit.INSTANCE;
}
}, new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m1447invoke();
return Unit.INSTANCE;
}
public final void m1447invoke() {
UserViewModel viewModel;
viewModel = StreamerDetailActivity.this.getViewModel();
UserViewModel.getUserDetails$default(viewModel, false, 1, null);
}
}, 8, null);
rechargeDialog2.setCancelable(true);
rechargeDialog2.show(streamerDetailActivity.getSupportFragmentManager(), "RechargeDialog");
} catch (Exception unused2) {
String string2 = streamerDetailActivity.getString(2131951993);
Intrinsics.checkNotNullExpressionValue(string2, "getString(R.string.error_unknown)");
ActivityExtKt.toast((Activity) streamerDetailActivity, string2);
}
} catch (Exception e) {
Timber.e(e);
}
}
public static final void handlePaymentListingMode$lambda$2$lambda$1(StreamerModel streamerModel, StreamerDetailActivity streamerDetailActivity, boolean z, List list, List list2) {
Intrinsics.checkNotNullParameter(streamerModel, "$streamer");
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(list, "<anonymous parameter 1>");
Intrinsics.checkNotNullParameter(list2, "<anonymous parameter 2>");
if (streamerModel.getBusy() || !streamerModel.getOnline()) {
ActivityExtKt.toast((Activity) streamerDetailActivity, "Streamer is busy or offline right now.");
return;
}
StreamerModel streamerModel2 = streamerDetailActivity.getViewModel().getStreamerModel();
if (streamerModel2 != null) {
CallActivity.INSTANCE.userCall((FragmentActivity) streamerDetailActivity, streamerModel2, (r17 & 4) != 0 ? Constants.ROLE.USER : null, (r17 & 8) != 0 ? false : streamerDetailActivity.isVip, (r17 & 16) != 0 ? null : streamerDetailActivity.launcher, (r17 & 32) != 0 ? Constants.VIDEO_CALL : "AUDIO", (r17 & 64) != 0 ? null : null);
}
}
private final void getStreamer() {
Context context = (Context) this;
this.firstRechargeDone = SharedPref.getBoolean(context, PrefKeys.FIRST_RECHARGE_DONE);
this.hideCallRate = SharedPref.getBoolean(context, PrefKeys.HIDE_CALL_RATE);
this.showVipPlan = SharedPref.getBoolean(context, PrefKeys.VIP_PLAN);
this.isVip = SharedPref.getBoolean(context, PrefKeys.IS_VIP);
Integer num = SharedPref.getInt(context, PrefKeys.PREMIUM_USER_WALLET_BALANCE);
Intrinsics.checkNotNullExpressionValue(num, "getInt(this@StreamerDeta…MIUM_USER_WALLET_BALANCE)");
this.premiumUserWalletBalance = num.intValue();
this.isPaymentAppMode = SharedPref.getBoolean(context, PrefKeys.IS_PAYMENT_APP_MODE);
this.hideStreamerPics = SharedPref.getBoolean(context, PrefKeys.HIDE_STREAMER_PICS);
TextView textView = ((ActivityStreamerDetailBinding) getBinding()).followBtn;
Intrinsics.checkNotNullExpressionValue(textView, "binding.followBtn");
textView.setVisibility(LoginActivity.INSTANCE.isVitok() ? 4 : 0);
TextView textView2 = ((ActivityStreamerDetailBinding) getBinding()).followTxt;
Intrinsics.checkNotNullExpressionValue(textView2, "binding.followTxt");
textView2.setVisibility(LoginActivity.INSTANCE.isVitok() ? 4 : 0);
long longExtra = getIntent().getLongExtra("id", -1L);
if (longExtra != -1) {
getViewModel().getStreamerDetails(longExtra);
getViewModel().setStreamerId(longExtra);
} else {
String stringExtra = getIntent().getStringExtra("streamer");
if (stringExtra != null) {
StreamerModel streamerModel = (StreamerModel) new Gson().fromJson(stringExtra, StreamerModel.class);
getViewModel().setStreamerModel(streamerModel);
getViewModel().setStreamerId(streamerModel.getId());
getViewModel().getStreamerDetails(streamerModel.getId());
}
}
if (LoginActivity.INSTANCE.isVitok()) {
RelativeLayout relativeLayout = ((ActivityStreamerDetailBinding) getBinding()).relativeLayout;
Intrinsics.checkNotNullExpressionValue(relativeLayout, "binding.relativeLayout");
relativeLayout.setVisibility(8);
ImageView imageView = ((ActivityStreamerDetailBinding) getBinding()).more;
Intrinsics.checkNotNullExpressionValue(imageView, "binding.more");
ViewExtKt.showOrInvisible(imageView, false);
}
}
public final void refresh() {
if (getViewModel().getStreamerId() != -1) {
getViewModel().getStreamerDetails(getViewModel().getStreamerId());
}
}
private final void onClicks() {
getBinding().back.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.onClicks$lambda$4(StreamerDetailActivity.this, view);
}
});
getBinding().followBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.onClicks$lambda$5(StreamerDetailActivity.this, view);
}
});
getBinding().more.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.onClicks$lambda$6(StreamerDetailActivity.this, view);
}
});
getBinding().sendWhatsappMessage.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.onClicks$lambda$8(StreamerDetailActivity.this, view);
}
});
}
public static final void onClicks$lambda$4(StreamerDetailActivity streamerDetailActivity, View view) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
streamerDetailActivity.onBackPressed();
}
public static final void onClicks$lambda$5(StreamerDetailActivity streamerDetailActivity, View view) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
if (Intrinsics.areEqual(streamerDetailActivity.getBinding().followBtn.getText(), "+ Follow")) {
streamerDetailActivity.getBinding().followBtn.setText(streamerDetailActivity.getString(2131952451));
} else {
streamerDetailActivity.getBinding().followBtn.setText(streamerDetailActivity.getString(2131952450));
}
streamerDetailActivity.getViewModel().followStreamer(!streamerDetailActivity.getBinding().followBtn.isSelected(), streamerDetailActivity.getViewModel().getStreamerId());
}
public static final void onClicks$lambda$6(StreamerDetailActivity streamerDetailActivity, View view) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
StreamerDetailBottomSheet streamerDetailBottomSheet = new StreamerDetailBottomSheet(streamerDetailActivity.getViewModel().getStreamerModel(), null, null, null, 14, null);
if (streamerDetailBottomSheet.isAdded() || streamerDetailBottomSheet.isVisible()) {
return;
}
streamerDetailBottomSheet.show(streamerDetailActivity.getSupportFragmentManager(), "StreamerDetailBottomSheet");
}
public static final void onClicks$lambda$8(StreamerDetailActivity streamerDetailActivity, View view) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
if (streamerDetailActivity.getViewModel().getBalance() != null) {
StreamerModel streamerModel = streamerDetailActivity.getViewModel().getStreamerModel();
if (streamerModel != null) {
streamerDetailActivity.showNotifyOnWhatsAppDialog(streamerModel);
return;
}
return;
}
streamerDetailActivity.refresh();
}
private final void showNotifyOnWhatsAppDialog(final StreamerModel streamer) {
String str = Intrinsics.areEqual(streamer.getGender(), "MALE") ? "his" : "her";
String str2 = Intrinsics.areEqual(streamer.getGender(), "MALE") ? "him" : "her";
Context context = (Context) this;
StringBuilder sb = new StringBuilder();
sb.append("We will notify ");
String name = streamer.getName();
if (name == null) {
name = "the streamer";
}
sb.append(name);
sb.append(" on ");
sb.append(str);
sb.append(" whatsapp that you are missing ");
sb.append(str2);
sb.append(". This will cost you ");
sb.append(NumberExtKt.formatByNumberRupee$default(streamer.getWhatsappNotifyCost(), false, 1, (Object) null));
DialogHelper.showReasonDialog(context, "", sb.toString(), false, getString(2131952458), getString(R.string.cancel), "", new DialogHelper.Listener() {
@Override
public void onNegativeClick() {
}
@Override
public void onPositiveClick() {
UserViewModel viewModel;
UserViewModel viewModel2;
viewModel = StreamerDetailActivity.this.getViewModel();
Balance balance = viewModel.getBalance();
Intrinsics.checkNotNull(balance);
if (balance.getBalance() >= streamer.getWhatsappNotifyCost()) {
viewModel2 = StreamerDetailActivity.this.getViewModel();
viewModel2.notifyStreamerOnWhatsapp(streamer.getId());
return;
}
try {
String str3 = "This action requires a minimum balance of " + NumberExtKt.formatByNumberRupee$default(streamer.getWhatsappNotifyCost(), false, 1, (Object) null) + ". Recharge now";
StreamerDetailActivity$showNotifyOnWhatsAppDialog$1$onPositiveClick$bottomSheet$1 streamerDetailActivity$showNotifyOnWhatsAppDialog$1$onPositiveClick$bottomSheet$1 = new Function0<Unit>() {
public final void m1456invoke() {
}
public Object invoke() {
m1456invoke();
return Unit.INSTANCE;
}
};
final StreamerDetailActivity streamerDetailActivity = StreamerDetailActivity.this;
final StreamerModel streamerModel = streamer;
RechargeDialog rechargeDialog = new RechargeDialog(null, null, null, str3, null, streamerDetailActivity$showNotifyOnWhatsAppDialog$1$onPositiveClick$bottomSheet$1, new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m1457invoke();
return Unit.INSTANCE;
}
public final void m1457invoke() {
UserViewModel viewModel3;
UserViewModel viewModel4;
viewModel3 = StreamerDetailActivity.this.getViewModel();
UserViewModel.getUserDetails$default(viewModel3, false, 1, null);
viewModel4 = StreamerDetailActivity.this.getViewModel();
viewModel4.getStreamerDetails(streamerModel.getId());
}
}, 16, null);
rechargeDialog.setCancelable(true);
if (!rechargeDialog.isAdded() && !rechargeDialog.isVisible()) {
rechargeDialog.show(StreamerDetailActivity.this.getSupportFragmentManager(), "RechargeDialog");
}
} catch (Exception unused) {
StreamerDetailActivity streamerDetailActivity2 = StreamerDetailActivity.this;
Activity activity = (Activity) streamerDetailActivity2;
String string = streamerDetailActivity2.getString(2131951993);
Intrinsics.checkNotNullExpressionValue(string, "getString(R.string.error_unknown)");
ActivityExtKt.toast(activity, string);
}
}
});
}
private final Job observeEvent() {
return BuildersKt.launch$default(LifecycleOwnerKt.getLifecycleScope((LifecycleOwner) this), (CoroutineContext) null, (CoroutineStart) null, new StreamerDetailActivity$observeEvent$1(this, null), 3, (Object) null);
}
public final void updateFirstRecharge(app.callpe.data.model.Metadata data) {
try {
Fragment findFragmentByTag = getSupportFragmentManager().findFragmentByTag("f1");
if (findFragmentByTag == null || !(findFragmentByTag instanceof PhotosFragment)) {
return;
}
((PhotosFragment) findFragmentByTag).updateFirstRecharge(data);
} catch (Exception e) {
Timber.e(e);
}
}
public final void setUpForbiddenCases(final StreamerModel data, final Balance userBalance) {
Integer num = SharedPref.getInt((Context) this, PrefKeys.UNBLOCK_REQUEST_CHARGE);
Intrinsics.checkNotNullExpressionValue(num, "getInt(this@StreamerDeta…s.UNBLOCK_REQUEST_CHARGE)");
this.unblockRequestCharge = num.intValue();
Integer forbiddenCase = data.getForbiddenCase();
if (forbiddenCase != null && forbiddenCase.intValue() == 0) {
((ActivityStreamerDetailBinding) getBinding()).relativeLayout2.setVisibility(8);
} else {
if (forbiddenCase != null && forbiddenCase.intValue() == 1) {
((ActivityStreamerDetailBinding) getBinding()).relativeLayout.setVisibility(8);
((ActivityStreamerDetailBinding) getBinding()).relativeLayout2.setVisibility(0);
((ActivityStreamerDetailBinding) getBinding()).unblockStreamerBtn.setVisibility(0);
TextView textView = ((ActivityStreamerDetailBinding) getBinding()).streamerNameInfo;
StringBuilder sb = new StringBuilder();
sb.append("you have blocked ");
String name = data.getName();
sb.append(name != null ? name : "");
textView.setText(sb.toString());
} else if (forbiddenCase != null && forbiddenCase.intValue() == 2) {
((ActivityStreamerDetailBinding) getBinding()).relativeLayout.setVisibility(8);
((ActivityStreamerDetailBinding) getBinding()).relativeLayout2.setVisibility(0);
((ActivityStreamerDetailBinding) getBinding()).requestUnblockBtn.setVisibility(0);
TextView textView2 = ((ActivityStreamerDetailBinding) getBinding()).requestBtnTxtInfo;
StringBuilder sb2 = new StringBuilder();
String name2 = data.getName();
sb2.append(name2 != null ? name2 : "");
sb2.append(" has blocked you");
textView2.setText(sb2.toString());
} else if (forbiddenCase != null && forbiddenCase.intValue() == 3) {
((ActivityStreamerDetailBinding) getBinding()).relativeLayout.setVisibility(8);
((ActivityStreamerDetailBinding) getBinding()).relativeLayout2.setVisibility(0);
((ActivityStreamerDetailBinding) getBinding()).pendingUnblockRequest.setVisibility(0);
} else if (forbiddenCase != null && forbiddenCase.intValue() == 4) {
((ActivityStreamerDetailBinding) getBinding()).relativeLayout.setVisibility(8);
((ActivityStreamerDetailBinding) getBinding()).relativeLayout2.setVisibility(0);
((ActivityStreamerDetailBinding) getBinding()).rejectedByStreamer.setVisibility(0);
}
}
((ActivityStreamerDetailBinding) getBinding()).unblockStreamerBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.setUpForbiddenCases$lambda$10(StreamerDetailActivity.this, data, view);
}
});
((ActivityStreamerDetailBinding) getBinding()).requestUnblockBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.setUpForbiddenCases$lambda$11(Balance.this, this, data, view);
}
});
}
public static final void setUpForbiddenCases$lambda$10(StreamerDetailActivity streamerDetailActivity, StreamerModel streamerModel, View view) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(streamerModel, "$data");
streamerDetailActivity.showDialogue(streamerModel);
}
public static final void setUpForbiddenCases$lambda$11(Balance balance, final StreamerDetailActivity streamerDetailActivity, StreamerModel streamerModel, View view) {
Intrinsics.checkNotNullParameter(balance, "$userBalance");
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(streamerModel, "$data");
if (((int) balance.getBalance()) >= streamerDetailActivity.unblockRequestCharge) {
new UnblockRequestBottomSheet(Integer.valueOf(streamerDetailActivity.unblockRequestCharge), streamerModel).show(streamerDetailActivity.getSupportFragmentManager(), "bottom_sheet");
return;
}
try {
RechargeDialog rechargeDialog = new RechargeDialog(null, balance, StreamerModel.getProfile$default(streamerModel, false, 1, null), "Your balance is low. You need at least " + NumberExtKt.formatByNumberRupee$default((Number) Integer.valueOf(streamerDetailActivity.unblockRequestCharge), false, 1, (Object) null) + " to request for unblock!", null, new Function0<Unit>() {
public final void m1448invoke() {
}
public Object invoke() {
m1448invoke();
return Unit.INSTANCE;
}
}, new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m1449invoke();
return Unit.INSTANCE;
}
public final void m1449invoke() {
UserViewModel viewModel;
viewModel = StreamerDetailActivity.this.getViewModel();
UserViewModel.getUserDetails$default(viewModel, false, 1, null);
}
}, 16, null);
rechargeDialog.setCancelable(true);
if (!rechargeDialog.isAdded() && !rechargeDialog.isVisible()) {
rechargeDialog.show(streamerDetailActivity.getSupportFragmentManager(), "RechargeDialog");
}
} catch (Exception unused) {
Activity activity = (Activity) streamerDetailActivity;
String string = streamerDetailActivity.getString(2131951993);
Intrinsics.checkNotNullExpressionValue(string, "getString(R.string.error_unknown)");
ActivityExtKt.toast(activity, string);
}
}
private final void showDialogue(final StreamerModel data) {
StringBuilder sb = new StringBuilder();
sb.append("Are you sure?\n");
String name = data.getName();
if (name == null) {
name = "";
}
sb.append(name);
sb.append(" will be unblocked.");
DialogHelper.showReasonDialog((Context) this, "", sb.toString(), true, new DialogHelper.Listener() {
@Override
public void onNegativeClick() {
}
@Override
public void onPositiveClick() {
UserViewModel viewModel;
viewModel = StreamerDetailActivity.this.getViewModel();
viewModel.unblockStreamer(data.getId());
}
});
}
public final void setUpValues(final StreamerModel streamer, final Balance userBalance) {
String str;
Integer age;
Object obj;
int i;
Integer age2;
if (!LoginActivity.INSTANCE.isVitok()) {
RelativeLayout relativeLayout = ((ActivityStreamerDetailBinding) getBinding()).relativeLayout;
Intrinsics.checkNotNullExpressionValue(relativeLayout, "binding.relativeLayout");
relativeLayout.setVisibility(0);
AppCompatImageView appCompatImageView = ((ActivityStreamerDetailBinding) getBinding()).sendWhatsappMessage;
Intrinsics.checkNotNullExpressionValue(appCompatImageView, "binding.sendWhatsappMessage");
((View) appCompatImageView).setVisibility(8);
}
String valueOf = String.valueOf(streamer.getName());
streamer.getAboutMe();
NumberExtKt.formatByNumberRupee$default(streamer.getDisplayRate(), false, 1, (Object) null);
getString(2131951652);
String city = streamer.getCity();
if (city == null || city.length() == 0) {
str = "";
} else if (streamer.getAge() == null || ((age = streamer.getAge()) != null && age.intValue() == 0)) {
str = "City: " + streamer.getCity();
} else {
str = ", " + streamer.getCity();
}
((ActivityStreamerDetailBinding) getBinding()).location.setText(str);
if (streamer.getFreeTrial()) {
RelativeLayout relativeLayout2 = ((ActivityStreamerDetailBinding) getBinding()).shineRL;
Intrinsics.checkNotNullExpressionValue(relativeLayout2, "binding.shineRL");
relativeLayout2.setVisibility(0);
((ActivityStreamerDetailBinding) getBinding()).tv11.setText("Free Call");
shineAnimation();
} else {
((ActivityStreamerDetailBinding) getBinding()).tv11.setText("Call");
RelativeLayout relativeLayout3 = ((ActivityStreamerDetailBinding) getBinding()).shineRL;
Intrinsics.checkNotNullExpressionValue(relativeLayout3, "binding.shineRL");
relativeLayout3.setVisibility(8);
}
if (streamer.getCountry() != null) {
((ActivityStreamerDetailBinding) getBinding()).countryName.setText(streamer.getCountry().getName());
Glide.with((FragmentActivity) this).load(streamer.getCountry().getFlagUrl()).into(((ActivityStreamerDetailBinding) getBinding()).countryFlag);
LinearLayout linearLayout = ((ActivityStreamerDetailBinding) getBinding()).countryParentBox;
Intrinsics.checkNotNullExpressionValue(linearLayout, "binding.countryParentBox");
linearLayout.setVisibility(0);
} else {
LinearLayout linearLayout2 = ((ActivityStreamerDetailBinding) getBinding()).countryParentBox;
Intrinsics.checkNotNullExpressionValue(linearLayout2, "binding.countryParentBox");
linearLayout2.setVisibility(8);
}
ImageView imageView = ((ActivityStreamerDetailBinding) getBinding()).streamerLiveIcon;
Intrinsics.checkNotNullExpressionValue(imageView, "binding.streamerLiveIcon");
imageView.setVisibility(8);
ImageView imageView2 = ((ActivityStreamerDetailBinding) getBinding()).streamerStatusIcon;
Intrinsics.checkNotNullExpressionValue(imageView2, "binding.streamerStatusIcon");
imageView2.setVisibility(0);
if (!LoginActivity.INSTANCE.isVitok() && !App.Companion.getStatusApiPingEnabled()) {
AppCompatImageView appCompatImageView2 = ((ActivityStreamerDetailBinding) getBinding()).callButton;
Intrinsics.checkNotNullExpressionValue(appCompatImageView2, "binding.callButton");
ViewExtKt.showOrInvisible((View) appCompatImageView2, true);
Context context = (Context) this;
((ActivityStreamerDetailBinding) getBinding()).videoCallBtn.setBackgroundTintList(ContextCompat.getColorStateList(context, 2131099815));
((ActivityStreamerDetailBinding) getBinding()).tv11.setTextColor(getColor(2131101146));
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setText(getString(2131952384));
((ActivityStreamerDetailBinding) getBinding()).streamerStatusIcon.setColorFilter(ContextCompat.getColor(context, 2131100034));
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setTextColor(ContextCompat.getColor(context, 2131100034));
} else if (streamer.getBusy()) {
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setText(getString(2131951753));
Context context2 = (Context) this;
((ActivityStreamerDetailBinding) getBinding()).streamerStatusIcon.setColorFilter(ContextCompat.getColor(context2, 2131100962));
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setTextColor(ContextCompat.getColor(context2, 2131100962));
} else if (streamer.isLive()) {
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setText(getString(2131952176));
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setTextColor(ContextCompat.getColor((Context) this, 2131100127));
ImageView imageView3 = ((ActivityStreamerDetailBinding) getBinding()).streamerLiveIcon;
Intrinsics.checkNotNullExpressionValue(imageView3, "binding.streamerLiveIcon");
imageView3.setVisibility(0);
ImageView imageView4 = ((ActivityStreamerDetailBinding) getBinding()).streamerStatusIcon;
Intrinsics.checkNotNullExpressionValue(imageView4, "binding.streamerStatusIcon");
imageView4.setVisibility(8);
} else if (streamer.getOnline()) {
AppCompatImageView appCompatImageView3 = ((ActivityStreamerDetailBinding) getBinding()).callButton;
Intrinsics.checkNotNullExpressionValue(appCompatImageView3, "binding.callButton");
ViewExtKt.showOrInvisible((View) appCompatImageView3, true);
Context context3 = (Context) this;
((ActivityStreamerDetailBinding) getBinding()).videoCallBtn.setBackgroundTintList(ContextCompat.getColorStateList(context3, 2131099815));
((ActivityStreamerDetailBinding) getBinding()).tv11.setTextColor(getColor(2131101146));
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setText(getString(2131952384));
((ActivityStreamerDetailBinding) getBinding()).streamerStatusIcon.setColorFilter(ContextCompat.getColor(context3, 2131100034));
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setTextColor(ContextCompat.getColor(context3, 2131100034));
} else {
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setText(getString(2131952376));
Context context4 = (Context) this;
((ActivityStreamerDetailBinding) getBinding()).streamerStatusIcon.setColorFilter(ContextCompat.getColor(context4, 2131101146));
((ActivityStreamerDetailBinding) getBinding()).onlineStatus.setTextColor(ContextCompat.getColor(context4, 2131101146));
}
setFragmentData(streamer);
ImageView imageView5 = ((ActivityStreamerDetailBinding) getBinding()).verifiedTag;
Intrinsics.checkNotNullExpressionValue(imageView5, "binding.verifiedTag");
imageView5.setVisibility(streamer.getFake() ^ true ? 0 : 8);
Glide.with((FragmentActivity) this).load(streamer.getFacePic()).into(((ActivityStreamerDetailBinding) getBinding()).profileImage);
((ActivityStreamerDetailBinding) getBinding()).followBtn.setSelected(streamer.getCurrentUserFollowingThisUser());
if (streamer.getCurrentUserFollowingThisUser()) {
((ActivityStreamerDetailBinding) getBinding()).followBtn.setText(getString(2131952451));
} else {
((ActivityStreamerDetailBinding) getBinding()).followBtn.setText(getString(2131952450));
}
if (!streamer.getPictures().isEmpty()) {
List<String> pictures = streamer.getPictures();
this.selectedPictures.addAll(pictures);
ProfileViewAdapter profileViewAdapter = this.adapter;
if (profileViewAdapter != null) {
Intrinsics.checkNotNull(pictures, "null cannot be cast to non-null type java.util.ArrayList<kotlin.String>{ kotlin.collections.TypeAliasesKt.ArrayList<kotlin.String> }");
profileViewAdapter.addItems((ArrayList) pictures);
}
}
((ActivityStreamerDetailBinding) getBinding()).followCount.setText(streamer.getFollowerCount() + " Followers");
streamer.getVideoCallCount();
((ActivityStreamerDetailBinding) getBinding()).videoCallBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.setUpValues$lambda$13(StreamerDetailActivity.this, streamer, userBalance, view);
}
});
((ActivityStreamerDetailBinding) getBinding()).streamerId.setText("ID: " + streamer.getId());
((ActivityStreamerDetailBinding) getBinding()).streamerId.setPaintFlags(((ActivityStreamerDetailBinding) getBinding()).streamerId.getPaintFlags() | 8);
ArrayList<String> languages = streamer.getLanguages();
String joinToString$default = languages != null ? CollectionsKt.joinToString$default(languages, ", ", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) null, 62, (Object) null) : null;
((ActivityStreamerDetailBinding) getBinding()).languageText.setText(joinToString$default);
TextView textView = ((ActivityStreamerDetailBinding) getBinding()).languageText;
Intrinsics.checkNotNullExpressionValue(textView, "binding.languageText");
textView.setVisibility((joinToString$default == null || joinToString$default.length() == 0) ^ true ? 0 : 8);
if (streamer.getAge() == null || ((age2 = streamer.getAge()) != null && age2.intValue() == 0)) {
TextView textView2 = ((ActivityStreamerDetailBinding) getBinding()).age;
Intrinsics.checkNotNullExpressionValue(textView2, "binding.age");
textView2.setVisibility(8);
} else {
((ActivityStreamerDetailBinding) getBinding()).age.setText("Age: " + streamer.getAge());
TextView textView3 = ((ActivityStreamerDetailBinding) getBinding()).age;
Intrinsics.checkNotNullExpressionValue(textView3, "binding.age");
textView3.setVisibility(0);
}
((ActivityStreamerDetailBinding) getBinding()).streamerName.setText(valueOf);
LevelDetails levelDetails = streamer.getLevelDetails();
if (levelDetails != null) {
levelDetails.getName();
}
ReviewDetails reviewDetails = streamer.getReviewDetails();
if (reviewDetails != null) {
reviewDetails.getRating();
}
ArrayList<String> languages2 = streamer.getLanguages();
if (languages2 == null) {
languages2 = new ArrayList<>();
}
setStreamerLanguage(languages2);
ArrayList<String> interests = streamer.getInterests();
if (interests != null) {
setStreamerInterestTag(interests);
}
String introVideo = streamer.getIntroVideo();
if (introVideo != null) {
if (introVideo.length() > 0) {
setVideoPath(introVideo);
}
}
((ActivityStreamerDetailBinding) getBinding()).profileImage.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.setUpValues$lambda$18(StreamerDetailActivity.this, streamer, view);
}
});
((ActivityStreamerDetailBinding) getBinding()).streamerId.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.setUpValues$lambda$19(StreamerDetailActivity.this, view);
}
});
if (streamer.getChatId() != null) {
LinearLayout linearLayout3 = ((ActivityStreamerDetailBinding) getBinding()).messageTvParent;
Intrinsics.checkNotNullExpressionValue(linearLayout3, "binding.messageTvParent");
linearLayout3.setVisibility(0);
FrameLayout frameLayout = ((ActivityStreamerDetailBinding) getBinding()).hiAnimParent;
Intrinsics.checkNotNullExpressionValue(frameLayout, "binding.hiAnimParent");
frameLayout.setVisibility(8);
}
((ActivityStreamerDetailBinding) getBinding()).messageBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
StreamerDetailActivity.setUpValues$lambda$23(StreamerModel.this, this, view);
}
});
View view = ((ActivityStreamerDetailBinding) getBinding()).videoCallBtn;
Intrinsics.checkNotNullExpressionValue(view, "binding.videoCallBtn");
view.setVisibility(0);
View view2 = ((ActivityStreamerDetailBinding) getBinding()).fakeVideoCallBtn;
Intrinsics.checkNotNullExpressionValue(view2, "binding.fakeVideoCallBtn");
view2.setVisibility(8);
if (this.showVipPlan || !this.isVip) {
obj = null;
i = 2131951652;
} else {
obj = null;
NumberExtKt.formatByNumberRupee$default(streamer.getVipCallRate(), false, 1, (Object) null);
i = 2131951652;
getString(2131951652);
}
NumberExtKt.formatByNumberRupee$default(streamer.getVipCallRate(), false, 1, obj);
getString(i);
if (this.isVip && !streamer.getOnline()) {
TextView textView4 = ((ActivityStreamerDetailBinding) getBinding()).lastActive;
Intrinsics.checkNotNullExpressionValue(textView4, "binding.lastActive");
textView4.setVisibility(0);
String offlineTime = streamer.getOfflineTime();
if (offlineTime != null) {
((ActivityStreamerDetailBinding) getBinding()).lastActive.setText("Last active: " + DateHelper.convertCustomDateTime$default(DateHelper.INSTANCE, offlineTime, (Context) this, true, null, 8, null));
}
} else {
TextView textView5 = ((ActivityStreamerDetailBinding) getBinding()).lastActive;
Intrinsics.checkNotNullExpressionValue(textView5, "binding.lastActive");
textView5.setVisibility(8);
}
TextView textView6 = ((ActivityStreamerDetailBinding) getBinding()).premiumText;
Intrinsics.checkNotNullExpressionValue(textView6, "binding.premiumText");
textView6.setVisibility(8);
ImageView imageView6 = ((ActivityStreamerDetailBinding) getBinding()).icVideo;
Intrinsics.checkNotNullExpressionValue(imageView6, "binding.icVideo");
ViewExtKt.showOrGone(imageView6, false);
if (!this.firstRechargeDone || !streamer.getOnlyPremiumUsers() || userBalance.getBalance() >= this.premiumUserWalletBalance || streamer.getFreeTrial()) {
return;
}
((ActivityStreamerDetailBinding) getBinding()).premiumText.setText("Balance ≥ " + this.premiumUserWalletBalance);
TextView textView7 = ((ActivityStreamerDetailBinding) getBinding()).premiumText;
Intrinsics.checkNotNullExpressionValue(textView7, "binding.premiumText");
textView7.setVisibility(0);
((ActivityStreamerDetailBinding) getBinding()).videoCallBtn.setBackgroundTintList(ContextCompat.getColorStateList((Context) this, 2131099895));
AppCompatImageView appCompatImageView4 = ((ActivityStreamerDetailBinding) getBinding()).callButton;
Intrinsics.checkNotNullExpressionValue(appCompatImageView4, "binding.callButton");
ViewExtKt.showOrGone((View) appCompatImageView4, false);
ImageView imageView7 = ((ActivityStreamerDetailBinding) getBinding()).icVideo;
Intrinsics.checkNotNullExpressionValue(imageView7, "binding.icVideo");
ViewExtKt.showOrGone(imageView7, true);
((ActivityStreamerDetailBinding) getBinding()).tv11.setTextColor(getColor(com.asynctaskcoffee.audiorecorder.R.color.black_70));
((ActivityStreamerDetailBinding) getBinding()).videoCallBtn.setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view3) {
StreamerDetailActivity.setUpValues$lambda$25(StreamerDetailActivity.this, streamer, userBalance, view3);
}
});
}
public static final void setUpValues$lambda$13(final StreamerDetailActivity streamerDetailActivity, StreamerModel streamerModel, final Balance balance, View view) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(streamerModel, "$streamer");
Intrinsics.checkNotNullParameter(balance, "$userBalance");
try {
CallSheet callSheet = new CallSheet(streamerDetailActivity.getViewModel().getBalance(), streamerModel, new StreamerDetailActivity$setUpValues$2$bottomSheet$1(streamerModel, streamerDetailActivity, balance), new Function1<Boolean, Unit>() {
{
super(1);
}
public Object invoke(Object obj) {
invoke(((Boolean) obj).booleanValue());
return Unit.INSTANCE;
}
public final void invoke(boolean z) {
try {
String string = StreamerDetailActivity.this.getString(2131952498);
Balance balance2 = balance;
StreamerDetailActivity$setUpValues$2$bottomSheet$2$bottomSheet$1 streamerDetailActivity$setUpValues$2$bottomSheet$2$bottomSheet$1 = new Function0<Unit>() {
public final void m1454invoke() {
}
public Object invoke() {
m1454invoke();
return Unit.INSTANCE;
}
};
final StreamerDetailActivity streamerDetailActivity2 = StreamerDetailActivity.this;
RechargeDialog rechargeDialog = new RechargeDialog(null, balance2, null, string, null, streamerDetailActivity$setUpValues$2$bottomSheet$2$bottomSheet$1, new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m1455invoke();
return Unit.INSTANCE;
}
public final void m1455invoke() {
UserViewModel viewModel;
viewModel = StreamerDetailActivity.this.getViewModel();
UserViewModel.getUserDetails$default(viewModel, false, 1, null);
}
});
rechargeDialog.setCancelable(true);
if (!rechargeDialog.isAdded() && !rechargeDialog.isVisible()) {
rechargeDialog.show(StreamerDetailActivity.this.getSupportFragmentManager(), "RechargeDialog");
}
} catch (Exception unused) {
StreamerDetailActivity streamerDetailActivity3 = StreamerDetailActivity.this;
Activity activity = (Activity) streamerDetailActivity3;
String string2 = streamerDetailActivity3.getString(2131951993);
Intrinsics.checkNotNullExpressionValue(string2, "getString(R.string.error_unknown)");
ActivityExtKt.toast(activity, string2);
}
}
});
if (!callSheet.isAdded() && !callSheet.isVisible()) {
callSheet.show(streamerDetailActivity.getSupportFragmentManager(), "bottomSheet");
}
} catch (Exception e) {
Timber.e(e);
}
}
public static final void setUpValues$lambda$18(StreamerDetailActivity streamerDetailActivity, StreamerModel streamerModel, View view) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(streamerModel, "$streamer");
Intent intent = new Intent((Context) streamerDetailActivity, (Class<?>) ImageShowActivity.class);
intent.putExtra("pics", streamerModel.getFacePic());
streamerDetailActivity.startActivity(intent);
}
public static final void setUpValues$lambda$19(StreamerDetailActivity streamerDetailActivity, View view) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Helper.copyToClipboard((Context) streamerDetailActivity, String.valueOf(streamerDetailActivity.getViewModel().getStreamerId()));
}
public static final void setUpValues$lambda$23(StreamerModel streamerModel, StreamerDetailActivity streamerDetailActivity, View view) {
Intrinsics.checkNotNullParameter(streamerModel, "$streamer");
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Long chatId = streamerModel.getChatId();
if (chatId != null) {
App.chatId = chatId.longValue();
App.profile = StreamerModel.getProfile$default(streamerModel, false, 1, null);
String name = streamerModel.getName();
if (name == null) {
name = "";
}
App.chatTitle = name;
Intent intent = new Intent((Context) streamerDetailActivity, (Class<?>) ChatActivity.class);
intent.setFlags(603979776);
streamerDetailActivity.startActivity(intent);
return;
}
((ActivityStreamerDetailBinding) streamerDetailActivity.getBinding()).messageBtn.setEnabled(false);
FrameLayout frameLayout = ((ActivityStreamerDetailBinding) streamerDetailActivity.getBinding()).hiAnimParent;
Intrinsics.checkNotNullExpressionValue(frameLayout, "binding.hiAnimParent");
frameLayout.setVisibility(8);
streamerDetailActivity.getViewModel().sendHiMessage(streamerModel.getId());
}
public static final void setUpValues$lambda$25(final StreamerDetailActivity streamerDetailActivity, StreamerModel streamerModel, Balance balance, View view) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(streamerModel, "$streamer");
Intrinsics.checkNotNullParameter(balance, "$userBalance");
String str = "You need a minimum balance of " + NumberExtKt.formatByNumberRupee$default((Number) Integer.valueOf(streamerDetailActivity.premiumUserWalletBalance), false, 1, (Object) null) + " to call " + streamerModel.getName() + ". Your balance is " + NumberExtKt.formatByNumberRupee$default((Number) Integer.valueOf((int) balance.getBalance()), false, 1, (Object) null) + ". Recharge Now 😍😘";
if (LoginActivity.INSTANCE.isNewUIApp()) {
str = "You need a minimum balance of " + NumberExtKt.formatByNumberRupee$default((Number) Integer.valueOf(streamerDetailActivity.premiumUserWalletBalance), false, 1, (Object) null) + " to call " + streamerModel.getName() + ". Your balance is " + NumberExtKt.formatByNumberRupee$default((Number) Integer.valueOf((int) balance.getBalance()), false, 1, (Object) null) + ". Recharge Now!";
}
try {
RechargeDialog rechargeDialog = new RechargeDialog(null, balance, StreamerModel.getProfile$default(streamerModel, false, 1, null), str, null, new Function0<Unit>() {
public final void m1450invoke() {
}
public Object invoke() {
m1450invoke();
return Unit.INSTANCE;
}
}, new Function0<Unit>() {
{
super(0);
}
public Object invoke() {
m1451invoke();
return Unit.INSTANCE;
}
public final void m1451invoke() {
UserViewModel viewModel;
viewModel = StreamerDetailActivity.this.getViewModel();
UserViewModel.getUserDetails$default(viewModel, false, 1, null);
}
}, 16, null);
rechargeDialog.setCancelable(true);
if (!rechargeDialog.isAdded() && !rechargeDialog.isVisible()) {
rechargeDialog.show(streamerDetailActivity.getSupportFragmentManager(), "RechargeDialog");
}
} catch (Exception unused) {
String string = streamerDetailActivity.getString(2131951993);
Intrinsics.checkNotNullExpressionValue(string, "getString(R.string.error_unknown)");
ActivityExtKt.toast((Activity) streamerDetailActivity, string);
}
}
private final void openImageVideoSlider(int startPosition, ArrayList<MediaFile> mediaList) {
try {
Intent intent = new Intent((Context) this, (Class<?>) MediaSliderActivity.class);
intent.putExtra("mediaUrlList", mediaList);
intent.putExtra("mediaType", AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_VIDEO);
intent.putExtra("isTitleVisible", false);
intent.putExtra("isMediaCountVisible", true);
intent.putExtra("isNavigationVisible", false);
intent.putExtra("title", "no title");
intent.putExtra("titleBackgroundColor", "#000000");
intent.putExtra("titleTextColor", "#000000");
intent.putExtra("startPosition", startPosition);
startActivity(intent);
} catch (Exception e) {
e.printStackTrace();
}
}
private final void setCallBtnBehaviour() {
if (this.firstRechargeDone) {
((ActivityStreamerDetailBinding) getBinding()).videoCallBtn.setClickable(false);
((ActivityStreamerDetailBinding) getBinding()).videoCallBtn.setBackgroundTintList(ContextCompat.getColorStateList((Context) this, 2131099895));
AppCompatImageView appCompatImageView = ((ActivityStreamerDetailBinding) getBinding()).callButton;
Intrinsics.checkNotNullExpressionValue(appCompatImageView, "binding.callButton");
ViewExtKt.showOrInvisible((View) appCompatImageView, false);
((ActivityStreamerDetailBinding) getBinding()).tv11.setTextColor(getColor(com.asynctaskcoffee.audiorecorder.R.color.black_50));
}
}
public final void setVideoPath(String url) {
Intrinsics.checkNotNullParameter(url, "url");
Context context = getBinding().getRoot().getContext();
if (this.exoPlayer != null) {
return;
}
RenderersFactory mediaCodecSelector = new DefaultRenderersFactory(context).setEnableDecoderFallback(true).setMediaCodecSelector(MediaCodecSelector.DEFAULT);
Intrinsics.checkNotNullExpressionValue(mediaCodecSelector, "DefaultRenderersFactory(…diaCodecSelector.DEFAULT)");
ExoPlayer build = new ExoPlayer.Builder(context, mediaCodecSelector).build();
Intrinsics.checkNotNullExpressionValue(build, "Builder(context, renderersFactory).build()");
this.exoPlayer = build;
ExoPlayer exoPlayer = null;
if (build == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
build = null;
}
build.addListener(new Player.Listener() {
public void onPlaybackStateChanged(int playbackState) {
super.onPlaybackStateChanged(playbackState);
}
});
ExoPlayer exoPlayer2 = this.exoPlayer;
if (exoPlayer2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
exoPlayer2 = null;
}
exoPlayer2.seekTo(0L);
ExoPlayer exoPlayer3 = this.exoPlayer;
if (exoPlayer3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
exoPlayer3 = null;
}
exoPlayer3.setRepeatMode(1);
ExoPlayer exoPlayer4 = this.exoPlayer;
if (exoPlayer4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
exoPlayer4 = null;
}
exoPlayer4.setVolume(0.0f);
MediaSource createMediaSource = new ProgressiveMediaSource.Factory(CacheDataSourceFactorySingleton.INSTANCE.get()).createMediaSource(MediaItem.fromUri(Uri.parse(url)));
this.mediaSource = createMediaSource;
if (createMediaSource != null) {
ExoPlayer exoPlayer5 = this.exoPlayer;
if (exoPlayer5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
exoPlayer5 = null;
}
exoPlayer5.setMediaSource(createMediaSource);
ExoPlayer exoPlayer6 = this.exoPlayer;
if (exoPlayer6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
exoPlayer6 = null;
}
exoPlayer6.prepare();
ExoPlayer exoPlayer7 = this.exoPlayer;
if (exoPlayer7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
exoPlayer7 = null;
}
exoPlayer7.setPlayWhenReady(true);
ExoPlayer exoPlayer8 = this.exoPlayer;
if (exoPlayer8 == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
} else {
exoPlayer = exoPlayer8;
}
exoPlayer.play();
}
}
public final void playMessageSentSound() {
try {
MediaPlayer create = MediaPlayer.create((Context) this, 2131886129);
create.start();
create.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public final void onCompletion(MediaPlayer mediaPlayer) {
mediaPlayer.release();
}
});
} catch (Exception e) {
Timber.e(e);
}
}
private final Context getContext() {
return (Context) this;
}
public boolean onOptionsItemSelected(MenuItem item) {
Intrinsics.checkNotNullParameter(item, "item");
if (item.getItemId() != 16908332) {
return true;
}
finish();
return true;
}
public void onBackPressed() {
if (isTaskRoot()) {
if (BaseActivity.isUser) {
Intent intent = new Intent((Context) this, (Class<?>) HomeActivity.class);
intent.addFlags(67108864);
startActivity(intent);
finish();
return;
}
Intent intent2 = new Intent((Context) this, (Class<?>) SplashActivity.class);
intent2.addFlags(67108864);
startActivity(intent2);
finish();
return;
}
super.onBackPressed();
}
@Override
public ActivityStreamerDetailBinding inflateLayout(LayoutInflater layoutInflater) {
Intrinsics.checkNotNullParameter(layoutInflater, "layoutInflater");
ActivityStreamerDetailBinding inflate = ActivityStreamerDetailBinding.inflate(layoutInflater);
Intrinsics.checkNotNullExpressionValue(inflate, "inflate(layoutInflater)");
return inflate;
}
protected void onResume() {
super.onResume();
if (refresh) {
UserViewModel.getUserDetails$default(getViewModel(), false, 1, null);
refresh();
refresh = false;
}
}
protected void onDestroy() {
super.onDestroy();
ExoPlayer exoPlayer = this.exoPlayer;
if (exoPlayer != null) {
if (exoPlayer == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
exoPlayer = null;
}
exoPlayer.stop();
ExoPlayer exoPlayer2 = this.exoPlayer;
if (exoPlayer2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("exoPlayer");
exoPlayer2 = null;
}
exoPlayer2.release();
}
this.mediaSource = null;
}
public final void requestPermissionIfNeeded(final List<String> permissions, final RequestCallback requestCallback) {
Iterator<String> it = permissions.iterator();
boolean z = true;
while (it.hasNext()) {
if (ContextCompat.checkSelfPermission((Context) this, it.next()) != 0) {
z = false;
}
}
if (!z) {
PermissionX.init((FragmentActivity) this).permissions(permissions).onExplainRequestReason(new ExplainReasonCallback() {
public final void onExplainReason(ExplainScope explainScope, List list) {
StreamerDetailActivity.requestPermissionIfNeeded$lambda$28(permissions, this, explainScope, list);
}
}).onForwardToSettings(new ForwardToSettingsCallback() {
public final void onForwardToSettings(ForwardScope forwardScope, List list) {
StreamerDetailActivity.requestPermissionIfNeeded$lambda$29(permissions, this, forwardScope, list);
}
}).request(new RequestCallback() {
public final void onResult(boolean z2, List list, List list2) {
StreamerDetailActivity.requestPermissionIfNeeded$lambda$30(requestCallback, z2, list, list2);
}
});
} else if (requestCallback != null) {
requestCallback.onResult(true, permissions, new ArrayList());
}
}
public static final void requestPermissionIfNeeded$lambda$28(List list, StreamerDetailActivity streamerDetailActivity, ExplainScope explainScope, List list2) {
String string;
Intrinsics.checkNotNullParameter(list, "$permissions");
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(explainScope, "scope");
Intrinsics.checkNotNullParameter(list2, "deniedList");
if (list.size() == 1) {
if (list2.contains("android.permission.CAMERA")) {
string = streamerDetailActivity.getString(2131952423);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callp…ermission_explain_camera)");
} else {
if (list2.contains("android.permission.RECORD_AUDIO")) {
string = streamerDetailActivity.getString(2131952425);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callp…g.permission_explain_mic)");
}
string = "";
}
} else if (list2.size() == 1) {
if (list2.contains("android.permission.CAMERA")) {
string = streamerDetailActivity.getString(2131952423);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callp…ermission_explain_camera)");
} else {
if (list2.contains("android.permission.RECORD_AUDIO")) {
string = streamerDetailActivity.getString(2131952425);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callp…g.permission_explain_mic)");
}
string = "";
}
} else {
string = streamerDetailActivity.getString(2131952424);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callp…ssion_explain_camera_mic)");
}
String string2 = streamerDetailActivity.getString(2131952377);
Intrinsics.checkNotNullExpressionValue(string2, "getString(app.callpe.R.string.ok)");
ExplainScope.showRequestReasonDialog$default(explainScope, list2, string, string2, (String) null, 8, (Object) null);
}
public static final void requestPermissionIfNeeded$lambda$29(List list, StreamerDetailActivity streamerDetailActivity, ForwardScope forwardScope, List list2) {
String string;
Intrinsics.checkNotNullParameter(list, "$permissions");
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(forwardScope, "scope");
Intrinsics.checkNotNullParameter(list2, "deniedList");
if (list.size() == 1) {
if (list2.contains("android.permission.CAMERA")) {
string = streamerDetailActivity.getString(2131952580);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callp…R.string.settings_camera)");
} else {
if (list2.contains("android.permission.RECORD_AUDIO")) {
string = streamerDetailActivity.getString(2131952582);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callpe.R.string.settings_mic)");
}
string = "";
}
} else if (list2.size() == 1) {
if (list2.contains("android.permission.CAMERA")) {
string = streamerDetailActivity.getString(2131952580);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callp…R.string.settings_camera)");
} else {
if (list2.contains("android.permission.RECORD_AUDIO")) {
string = streamerDetailActivity.getString(2131952582);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callpe.R.string.settings_mic)");
}
string = "";
}
} else {
string = streamerDetailActivity.getString(2131952581);
Intrinsics.checkNotNullExpressionValue(string, "this.getString(app.callp…ring.settings_camera_mic)");
}
String string2 = streamerDetailActivity.getString(2131952579);
Intrinsics.checkNotNullExpressionValue(string2, "getString(app.callpe.R.string.settings)");
ForwardScope.showForwardToSettingsDialog$default(forwardScope, list2, string, string2, (String) null, 8, (Object) null);
}
public static final void requestPermissionIfNeeded$lambda$30(RequestCallback requestCallback, boolean z, List list, List list2) {
Intrinsics.checkNotNullParameter(list, "grantedList");
Intrinsics.checkNotNullParameter(list2, "deniedList");
if (requestCallback != null) {
requestCallback.onResult(z, list, list2);
}
}
public static final void launcher$lambda$31(StreamerDetailActivity streamerDetailActivity, ActivityResult activityResult) {
Intrinsics.checkNotNullParameter(streamerDetailActivity, "this$0");
Intrinsics.checkNotNullParameter(activityResult, "result");
if (activityResult.getResultCode() == 101010) {
streamerDetailActivity.refresh();
}
}
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\t\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u0016\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\u000eJ\u0016\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\u000f\u001a\u00020\u0010R\u001a\u0010\u0003\u001a\u00020\u0004X\u0086\u000e¢\u0006\u000e\n\u0000\u001a\u0004\b\u0005\u0010\u0006\"\u0004\b\u0007\u0010\b¨\u0006\u0011"}, d2 = {"Lapp/callpe/ui/home/StreamerDetailActivity$Companion;", "", "()V", "refresh", "", "getRefresh", "()Z", "setRefresh", "(Z)V", "openScreen", "", "activity", "Landroidx/fragment/app/FragmentActivity;", "streamer", "Lapp/callpe/data/model/StreamerModel;", "id", "", "app_bikoRelease"}, k = 1, mv = {1, 8, 0}, xi = 48)
public static final class Companion {
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
private Companion() {
}
public final boolean getRefresh() {
return StreamerDetailActivity.refresh;
}
public final void setRefresh(boolean z) {
StreamerDetailActivity.refresh = z;
}
public final void openScreen(FragmentActivity activity, StreamerModel streamer) {
Intrinsics.checkNotNullParameter(activity, "activity");
Intrinsics.checkNotNullParameter(streamer, "streamer");
Intent intent = new Intent((Context) activity, (Class<?>) StreamerDetailActivity.class);
intent.putExtra("streamer", new Gson().toJson(streamer));
activity.startActivity(intent);
}
public final void openScreen(FragmentActivity activity, long id) {
Intrinsics.checkNotNullParameter(activity, "activity");
Intent intent = new Intent((Context) activity, (Class<?>) StreamerDetailActivity.class);
intent.putExtra("id", id);
activity.startActivity(intent);
}
}
private final void setUpNavigation() {
View view = getBinding().viewpager;
Intrinsics.checkNotNullExpressionValue(view, "binding.viewpager");
ViewExtKt.showOrInvisible(view, false);
this.mTabLayout = getBinding().tabLayout;
this.viewPager = getBinding().viewpager;
FragmentManager supportFragmentManager = getSupportFragmentManager();
Intrinsics.checkNotNullExpressionValue(supportFragmentManager, "supportFragmentManager");
Lifecycle lifecycle = getLifecycle();
Intrinsics.checkNotNullExpressionValue(lifecycle, "lifecycle");
RecyclerView.Adapter viewPager2Adapter = new ViewPager2Adapter(supportFragmentManager, lifecycle, this.isPaymentAppMode, this.hideStreamerPics);
this.mViewPagerAdapter = viewPager2Adapter;
ViewPager2 viewPager2 = this.viewPager;
if (viewPager2 != null) {
viewPager2.setAdapter(viewPager2Adapter);
}
ViewPager2 viewPager22 = this.viewPager;
if (viewPager22 != null) {
viewPager22.setOffscreenPageLimit(2);
}
ViewPager2 viewPager23 = this.viewPager;
if (viewPager23 != null) {
viewPager23.setUserInputEnabled(true);
}
ViewPager2 viewPager24 = this.viewPager;
if (viewPager24 != null) {
viewPager24.isFocused();
}
if (this.isPaymentAppMode || this.hideStreamerPics) {
View view2 = this.mTabLayout;
if (view2 != null) {
view2.setVisibility(8);
}
ViewPager2 viewPager25 = this.viewPager;
if (viewPager25 != null) {
viewPager25.setOffscreenPageLimit(1);
}
ViewPager2 viewPager26 = this.viewPager;
if (viewPager26 != null) {
viewPager26.setUserInputEnabled(false);
}
ViewPager2 viewPager27 = this.viewPager;
if (viewPager27 != null) {
viewPager27.isFocused();
}
} else {
View view3 = this.mTabLayout;
if (view3 != null) {
view3.setVisibility(0);
}
ViewPager2 viewPager28 = this.viewPager;
if (viewPager28 != null) {
viewPager28.setOffscreenPageLimit(2);
}
ViewPager2 viewPager29 = this.viewPager;
if (viewPager29 != null) {
viewPager29.setUserInputEnabled(true);
}
ViewPager2 viewPager210 = this.viewPager;
if (viewPager210 != null) {
viewPager210.isFocused();
}
}
ViewPager2 viewPager211 = this.viewPager;
if (viewPager211 != null) {
viewPager211.registerOnPageChangeCallback(new ViewPager2.OnPageChangeCallback() {
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
public void onPageSelected(int position) {
}
});
}
TabLayout tabLayout = this.mTabLayout;
Intrinsics.checkNotNull(tabLayout);
ViewPager2 viewPager212 = this.viewPager;
Intrinsics.checkNotNull(viewPager212);
new TabLayoutMediator(tabLayout, viewPager212, new TabLayoutMediator.TabConfigurationStrategy() {
public final void onConfigureTab(TabLayout.Tab tab, int i) {
StreamerDetailActivity.setUpNavigation$lambda$32(tab, i);
}
}).attach();
}
public static final void setUpNavigation$lambda$32(TabLayout.Tab tab, int i) {
Intrinsics.checkNotNullParameter(tab, "tab");
if (i == 0) {
tab.setText("Info");
} else {
if (i != 1) {
return;
}
tab.setText("Gallery");
}
}
private final void setFragmentData(StreamerModel streamer) {
BuildersKt.launch$default(LifecycleOwnerKt.getLifecycleScope((LifecycleOwner) this), (CoroutineContext) null, (CoroutineStart) null, new StreamerDetailActivity$setFragmentData$1(this, streamer, null), 3, (Object) null);
}
@Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0002\b\u0004\u0018\u00002\u00020\u0001B%\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\u0006\u0010\b\u001a\u00020\u0007¢\u0006\u0002\u0010\tJ\u0010\u0010\n\u001a\u00020\u000b2\u0006\u0010\f\u001a\u00020\rH\u0016J\u000e\u0010\u000e\u001a\u00020\u000b2\u0006\u0010\u000f\u001a\u00020\rJ\b\u0010\u0010\u001a\u00020\rH\u0016R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\b\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0011"}, d2 = {"Lapp/callpe/ui/home/StreamerDetailActivity$ViewPager2Adapter;", "Landroidx/viewpager2/adapter/FragmentStateAdapter;", "fm", "Landroidx/fragment/app/FragmentManager;", "lifecycle", "Landroidx/lifecycle/Lifecycle;", "isPaymentAppMode", "", "hideStreamerPics", "(Landroidx/fragment/app/FragmentManager;Landroidx/lifecycle/Lifecycle;ZZ)V", "createFragment", "Landroidx/fragment/app/Fragment;", "position", "", "getItem", "currentItem", "getItemCount", "app_bikoRelease"}, k = 1, mv = {1, 8, 0}, xi = 48)
public static final class ViewPager2Adapter extends FragmentStateAdapter {
private final FragmentManager fm;
private final boolean hideStreamerPics;
private final boolean isPaymentAppMode;
public ViewPager2Adapter(FragmentManager fragmentManager, Lifecycle lifecycle, boolean z, boolean z2) {
super(fragmentManager, lifecycle);
Intrinsics.checkNotNullParameter(fragmentManager, "fm");
Intrinsics.checkNotNullParameter(lifecycle, "lifecycle");
this.fm = fragmentManager;
this.isPaymentAppMode = z;
this.hideStreamerPics = z2;
}
public Fragment createFragment(int position) {
if (this.isPaymentAppMode || this.hideStreamerPics) {
return new BioFragment();
}
if (LoginActivity.INSTANCE.isVitok()) {
if (position == 0) {
return new BioFragment();
}
if (position == 1) {
return new PhotosFragment();
}
if (position == 2) {
return new VideoFragment();
}
return new BioFragment();
}
if (position == 0) {
return new BioFragment();
}
if (position == 1) {
return new PhotosFragment();
}
if (position == 2) {
return new VideoFragment();
}
return new PhotosFragment();
}
public int getItemCount() {
return (this.isPaymentAppMode || this.hideStreamerPics) ? 1 : 2;
}
public final Fragment getItem(int currentItem) {
Object obj = this.fm.getFragments().get(currentItem);
Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type androidx.fragment.app.Fragment");
return (Fragment) obj;
}
}
private final void setTabIcons() {
if (LoginActivity.INSTANCE.isVitok()) {
TabLayout.Tab tabAt = getBinding().tabLayout.getTabAt(0);
if (tabAt != null) {
tabAt.setIcon(2131230915);
}
TabLayout.Tab tabAt2 = getBinding().tabLayout.getTabAt(1);
if (tabAt2 != null) {
tabAt2.setIcon(2131231490);
}
TabLayout.Tab tabAt3 = getBinding().tabLayout.getTabAt(2);
if (tabAt3 != null) {
tabAt3.setIcon(2131232066);
return;
}
return;
}
TabLayout.Tab tabAt4 = getBinding().tabLayout.getTabAt(0);
if (tabAt4 != null) {
tabAt4.setIcon(2131230915);
}
TabLayout.Tab tabAt5 = getBinding().tabLayout.getTabAt(1);
if (tabAt5 != null) {
tabAt5.setIcon(2131231490);
}
TabLayout.Tab tabAt6 = getBinding().tabLayout.getTabAt(2);
if (tabAt6 != null) {
tabAt6.setIcon(2131232066);
}
}
}