2021-08-03 07:33:18 +00:00
package com.discord.widgets.friends ;
import android.content.Context ;
import android.view.MenuItem ;
import androidx.fragment.app.FragmentManager ;
2021-08-09 22:51:56 +00:00
import com.discord.R ;
2021-08-03 07:33:18 +00:00
import com.discord.utilities.analytics.AnalyticsTracker ;
import com.discord.utilities.analytics.Traits ;
import com.discord.widgets.channels.WidgetGroupInviteFriends ;
import com.discord.widgets.channels.invite.GroupInviteFriendsSheet ;
import com.discord.widgets.channels.invite.GroupInviteFriendsSheetFeatureFlag ;
2021-09-29 06:32:07 +00:00
import com.discord.widgets.contact_sync.ContactSyncFlowAnalytics ;
2021-08-03 07:33:18 +00:00
import com.discord.widgets.contact_sync.WidgetContactSync ;
import com.discord.widgets.friends.WidgetFriendsAdd ;
2021-11-02 06:38:17 +00:00
import d0.o ;
import d0.t.g0 ;
import d0.z.d.m ;
2021-08-03 07:33:18 +00:00
import rx.functions.Action2 ;
/* compiled from: WidgetFriendsList.kt */
public final class WidgetFriendsList$configureToolbar$1 < T1 , T2 > implements Action2 < MenuItem , Context > {
public final /* synthetic */ WidgetFriendsList this $0 ;
public WidgetFriendsList$configureToolbar$1 ( WidgetFriendsList widgetFriendsList ) {
this . this$0 = widgetFriendsList ;
}
public final void call ( MenuItem menuItem , Context context ) {
m . checkNotNullExpressionValue ( menuItem , " menuItem " ) ;
switch ( menuItem . getItemId ( ) ) {
2021-12-27 07:18:26 +00:00
case R . id . menu_friends_add_friend /* 2131364315 */ :
2021-08-03 07:33:18 +00:00
WidgetFriendsAdd . Companion companion = WidgetFriendsAdd . Companion ;
m . checkNotNullExpressionValue ( context , " context " ) ;
WidgetFriendsAdd . Companion . show$default ( companion , context , null , " Friends " , 2 , null ) ;
return ;
2021-12-27 07:18:26 +00:00
case R . id . menu_friends_contact_sync /* 2131364316 */ :
2021-09-29 06:32:07 +00:00
ContactSyncFlowAnalytics . Companion . trackStart$default ( ContactSyncFlowAnalytics . Companion , false , g0 . mapOf ( o . to ( " location_page " , " Friends List Icon " ) ) , 1 , null ) ;
2021-08-03 07:33:18 +00:00
AnalyticsTracker . INSTANCE . openModal ( " Contact Sync " , new Traits . Location ( " Friends List Icon " , null , null , null , null , 30 , null ) ) ;
WidgetContactSync . Companion companion2 = WidgetContactSync . Companion ;
m . checkNotNullExpressionValue ( context , " context " ) ;
WidgetContactSync . Companion . launch$default ( companion2 , context , null , false , false , false , 30 , null ) ;
return ;
2021-12-27 07:18:26 +00:00
case R . id . menu_friends_start_group /* 2131364317 */ :
2021-08-03 07:33:18 +00:00
if ( GroupInviteFriendsSheetFeatureFlag . Companion . getINSTANCE ( ) . isEnabled ( ) ) {
GroupInviteFriendsSheet . Companion companion3 = GroupInviteFriendsSheet . Companion ;
FragmentManager parentFragmentManager = this . this$0 . getParentFragmentManager ( ) ;
m . checkNotNullExpressionValue ( parentFragmentManager , " parentFragmentManager " ) ;
GroupInviteFriendsSheet . Companion . show$default ( companion3 , parentFragmentManager , 0 , " Friends " , 2 , null ) ;
return ;
}
WidgetGroupInviteFriends . Companion . launch ( this . this$0 . requireContext ( ) , " Friends " ) ;
return ;
default :
return ;
}
}
}