2021-12-21 23:37:30 +00:00
|
|
|
package b.b.a.a;
|
2021-06-27 20:44:35 +00:00
|
|
|
|
|
|
|
import com.lytefast.flexinput.fragment.FlexInputFragment;
|
|
|
|
import com.lytefast.flexinput.model.Attachment;
|
|
|
|
import com.lytefast.flexinput.utils.SelectionCoordinator;
|
|
|
|
import com.lytefast.flexinput.viewmodel.FlexInputViewModel;
|
|
|
|
/* compiled from: FlexInputFragment.kt */
|
2022-03-02 20:59:20 +00:00
|
|
|
/* loaded from: classes3.dex */
|
2021-06-27 20:44:35 +00:00
|
|
|
public final class m implements SelectionCoordinator.ItemSelectionListener<Attachment<? extends Object>> {
|
|
|
|
public final /* synthetic */ FlexInputFragment a;
|
|
|
|
|
|
|
|
public m(FlexInputFragment flexInputFragment) {
|
|
|
|
this.a = flexInputFragment;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.lytefast.flexinput.utils.SelectionCoordinator.ItemSelectionListener
|
|
|
|
public void onItemSelected(Attachment<? extends Object> attachment) {
|
2022-02-14 21:43:51 +00:00
|
|
|
Attachment<? extends Object> attachment2 = attachment;
|
|
|
|
d0.z.d.m.checkNotNullParameter(attachment2, "item");
|
2022-04-12 20:58:48 +00:00
|
|
|
FlexInputViewModel flexInputViewModel = this.a.f3159s;
|
2022-02-14 21:43:51 +00:00
|
|
|
if (flexInputViewModel == null || !flexInputViewModel.isSingleSelectMode()) {
|
|
|
|
FlexInputFragment flexInputFragment = this.a;
|
2022-04-12 20:58:48 +00:00
|
|
|
FlexInputViewModel flexInputViewModel2 = flexInputFragment.f3159s;
|
2022-02-14 21:43:51 +00:00
|
|
|
if (flexInputViewModel2 != null) {
|
|
|
|
flexInputViewModel2.onAttachmentsUpdated(flexInputFragment.b().getAttachments());
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
return;
|
|
|
|
}
|
2022-04-12 20:58:48 +00:00
|
|
|
FlexInputViewModel flexInputViewModel3 = this.a.f3159s;
|
2022-02-14 21:43:51 +00:00
|
|
|
if (flexInputViewModel3 != null) {
|
|
|
|
flexInputViewModel3.onSingleAttachmentSelected(attachment2);
|
|
|
|
}
|
2022-04-12 20:58:48 +00:00
|
|
|
FlexInputViewModel flexInputViewModel4 = this.a.f3159s;
|
2022-02-14 21:43:51 +00:00
|
|
|
if (flexInputViewModel4 != null) {
|
|
|
|
flexInputViewModel4.onContentDialogDismissed(true);
|
2021-06-27 20:44:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.lytefast.flexinput.utils.SelectionCoordinator.ItemSelectionListener
|
|
|
|
public void onItemUnselected(Attachment<? extends Object> attachment) {
|
2021-11-08 18:25:28 +00:00
|
|
|
d0.z.d.m.checkNotNullParameter(attachment, "item");
|
2021-06-27 20:44:35 +00:00
|
|
|
FlexInputFragment flexInputFragment = this.a;
|
2022-04-12 20:58:48 +00:00
|
|
|
FlexInputViewModel flexInputViewModel = flexInputFragment.f3159s;
|
2021-06-27 20:44:35 +00:00
|
|
|
if (flexInputViewModel != null) {
|
|
|
|
flexInputViewModel.onAttachmentsUpdated(flexInputFragment.b().getAttachments());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override // com.lytefast.flexinput.utils.SelectionCoordinator.ItemSelectionListener
|
|
|
|
public void unregister() {
|
|
|
|
}
|
|
|
|
}
|