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