47 lines
1.6 KiB
Java
47 lines
1.6 KiB
Java
package c.b.a.a;
|
|
|
|
import androidx.fragment.app.Fragment;
|
|
import androidx.viewpager.widget.ViewPager;
|
|
import c0.z.d.m;
|
|
import com.google.android.material.tabs.TabLayout;
|
|
import com.lytefast.flexinput.fragment.FlexInputFragment;
|
|
import com.lytefast.flexinput.viewmodel.FlexInputViewModel;
|
|
/* compiled from: AddContentDialogFragment.kt */
|
|
public final class b implements TabLayout.OnTabSelectedListener {
|
|
public final /* synthetic */ a a;
|
|
|
|
public b(a aVar) {
|
|
this.a = aVar;
|
|
}
|
|
|
|
@Override // com.google.android.material.tabs.TabLayout.BaseOnTabSelectedListener
|
|
public void onTabReselected(TabLayout.Tab tab) {
|
|
m.checkNotNullParameter(tab, "tab");
|
|
}
|
|
|
|
@Override // com.google.android.material.tabs.TabLayout.BaseOnTabSelectedListener
|
|
public void onTabSelected(TabLayout.Tab tab) {
|
|
FlexInputViewModel flexInputViewModel;
|
|
m.checkNotNullParameter(tab, "tab");
|
|
int position = tab.getPosition();
|
|
if (position == 3) {
|
|
this.a.h(false);
|
|
Fragment parentFragment = this.a.getParentFragment();
|
|
if ((parentFragment instanceof FlexInputFragment) && (flexInputViewModel = ((FlexInputFragment) parentFragment).f2925r) != null) {
|
|
flexInputViewModel.onCreateThreadSelected();
|
|
return;
|
|
}
|
|
return;
|
|
}
|
|
ViewPager viewPager = this.a.j;
|
|
if (viewPager != null) {
|
|
viewPager.setCurrentItem(position);
|
|
}
|
|
}
|
|
|
|
@Override // com.google.android.material.tabs.TabLayout.BaseOnTabSelectedListener
|
|
public void onTabUnselected(TabLayout.Tab tab) {
|
|
m.checkNotNullParameter(tab, "tab");
|
|
}
|
|
}
|