2021-12-21 23:37:30 +00:00
|
|
|
package b.b.a.a;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
2021-08-24 17:45:16 +00:00
|
|
|
import androidx.fragment.app.Fragment;
|
2021-06-27 20:44:35 +00:00
|
|
|
import androidx.viewpager.widget.ViewPager;
|
|
|
|
import com.google.android.material.tabs.TabLayout;
|
2021-08-24 17:45:16 +00:00
|
|
|
import com.lytefast.flexinput.fragment.FlexInputFragment;
|
|
|
|
import com.lytefast.flexinput.viewmodel.FlexInputViewModel;
|
2021-11-08 18:25:28 +00:00
|
|
|
import d0.z.d.m;
|
2021-06-27 20:44:35 +00:00
|
|
|
/* 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) {
|
2021-08-24 17:45:16 +00:00
|
|
|
FlexInputViewModel flexInputViewModel;
|
2021-06-27 20:44:35 +00:00
|
|
|
m.checkNotNullParameter(tab, "tab");
|
|
|
|
int position = tab.getPosition();
|
2021-08-24 17:45:16 +00:00
|
|
|
if (position == 3) {
|
|
|
|
this.a.h(false);
|
|
|
|
Fragment parentFragment = this.a.getParentFragment();
|
2022-02-10 03:03:45 +00:00
|
|
|
if ((parentFragment instanceof FlexInputFragment) && (flexInputViewModel = ((FlexInputFragment) parentFragment).f3137s) != null) {
|
2021-08-24 17:45:16 +00:00
|
|
|
flexInputViewModel.onCreateThreadSelected();
|
|
|
|
return;
|
|
|
|
}
|
2021-06-27 20:44:35 +00:00
|
|
|
return;
|
|
|
|
}
|
2021-12-17 22:03:14 +00:00
|
|
|
ViewPager viewPager = this.a.k;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (viewPager != null) {
|
2021-08-24 17:45:16 +00:00
|
|
|
viewPager.setCurrentItem(position);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.google.android.material.tabs.TabLayout.BaseOnTabSelectedListener
|
|
|
|
public void onTabUnselected(TabLayout.Tab tab) {
|
|
|
|
m.checkNotNullParameter(tab, "tab");
|
|
|
|
}
|
|
|
|
}
|