Skip to content

Instantly share code, notes, and snippets.

@parthibx24
Created July 9, 2022 08:20
Show Gist options
  • Select an option

  • Save parthibx24/c94712f07c373ae4f0c32ea50c48cc2e to your computer and use it in GitHub Desktop.

Select an option

Save parthibx24/c94712f07c373ae4f0c32ea50c48cc2e to your computer and use it in GitHub Desktop.
public final void renderList(boolean r34_isSelfProfile, com.riotgames.shared.profile.ProfileState r35_profileState, boolean r36, boolean r37, boolean r38_showMatchHistoryCard) {
r33 = this;
r0_profileState = r35_profileState
java.util.ArrayList r1_arrayList = new java.util.ArrayList
r1_arrayList.<init>()
r2_firstIndex = 0
if (r34_isSelfProfile == 0) goto L2c_showNonFriendProfile
com.riotgames.mobile.profile.ui.ProfileCard r3 = new com.riotgames.mobile.profile.ui.ProfileCard
com.riotgames.mobile.profile.ui.Profile r4 = new com.riotgames.mobile.profile.ui.Profile
java.lang.String r5 = r35_profileState.getGameName()
java.lang.String r6 = r35_profileState.getPuuid()
java.lang.String r7 = r35_profileState.getTagline()
java.lang.String r8 = r35_profileState.getStatus()
r4.<init>(r5, r6, r7, r8)
com.riotgames.shared.social.SocialPresence r5 = r35_profileState.getPresence()
r3.<init>(r4, r5)
r1_arrayList.add(r2_firstIndex, r3)
goto L4f_showMatchHistoryCard
L2c_showNonFriendProfile:
com.riotgames.shared.social.SocialPresence r3_socialPresence = r35_profileState.getPresence()
if (r3_socialPresence != 0) goto L41_showFriendCard // 0 is used instead of null ?????
com.riotgames.mobile.profile.ui.NonFriendCard r3_nonFriendCard = new com.riotgames.mobile.profile.ui.NonFriendCard
com.riotgames.mobile.profile.ui.Profile$Companion r4 = com.riotgames.mobile.profile.ui.Profile.Companion
com.riotgames.mobile.profile.ui.Profile r4 = r4.fromProfileState(r0)
r3_nonFriendCard.<init>(r4)
r1_arrayList.add(r2_firstIndex, r3_nonFriendCard)
goto L4f_showMatchHistoryCard
L41_showFriendCard:
com.riotgames.mobile.profile.ui.FriendCard r4_friendCard = new com.riotgames.mobile.profile.ui.FriendCard
com.riotgames.mobile.profile.ui.Profile$Companion r5_profile = com.riotgames.mobile.profile.ui.Profile.Companion
com.riotgames.mobile.profile.ui.Profile r5_profile = r5_profile.fromProfileState(r0)
r4_friendCard.<init>(r5_profile, r3_socialPresence)
r1_arrayList.add(r2_firstIndex, r4_friendCard)
L4f_showMatchHistoryCard:
java.lang.String r3_str_matchHistoryCard = "match-history-card"
r4_matchHistoryCardIndex = 1
if (!r38_showMatchHistoryCard) goto Lb0_showGameCards
com.riotgames.mobile.profile.ui.MatchHistoryCard r5_matchHistoryCard = new com.riotgames.mobile.profile.ui.MatchHistoryCard
java.lang.String r6 = r35_profileState.getPuuid()
boolean r7 = r35_profileState.getShouldHighlightHistory()
com.riotgames.shared.lolData.LolRankTier r11 = com.riotgames.shared.lolData.LolRankTier.IRON
com.riotgames.shared.lolData.LolRankQueueType r13 = com.riotgames.shared.lolData.LolRankQueueType.SOLO_DUO
com.riotgames.shared.lolData.LolRankLevel r14 = com.riotgames.shared.lolData.LolRankLevel.II
com.riotgames.shared.lolData.LoLRankDetails r17 = new com.riotgames.shared.lolData.LoLRankDetails
r15 = 10
java.lang.String r9 = "Duo"
java.lang.String r10 = "Duo"
java.lang.String r12 = "Duo"
r8 = r17
r8.<init>(r9, r10, r11, r12, r13, r14, r15)
java.util.List r19 = a.b.e0.a.a.A0(r17)
java.lang.String r8 = "https://ddragon.leagueoflegends.com/cdn/11.12.1/img/champion/Annie.png"
java.lang.String r9 = "https://ddragon.leagueoflegends.com/cdn/11.12.1/img/champion/Olaf.png"
java.lang.String r10 = "https://ddragon.leagueoflegends.com/cdn/11.12.1/img/champion/Galio.png"
java.lang.String r11 = "https://ddragon.leagueoflegends.com/cdn/11.12.1/img/champion/TwistedFate.png"
java.lang.String r12 = "https://ddragon.leagueoflegends.com/cdn/11.12.1/img/champion/XinZhao.png"
java.lang.String r13 = "https://ddragon.leagueoflegends.com/cdn/11.12.1/img/champion/Urgot.png"
java.lang.String[] r8 = new java.lang.String[]{r8, r9, r10, r11, r12, r13}
java.util.List r20 = m.w.j.z(r8)
com.riotgames.shared.profile.LolGame r8 = new com.riotgames.shared.profile.LolGame
r22 = 0
r23 = 0
r31 = 16
r32 = 0
java.lang.String r21 = ""
java.lang.String r24 = ""
java.lang.String r25 = ""
java.lang.String r26 = ""
java.lang.String r27 = ""
java.lang.String r28 = ""
java.lang.String r29 = ""
java.lang.String r30 = ""
r18 = r8
r18.<init>(r19, r20, r21, r22, r23, r24, r25, r26, r27, r28, r29, r30, r31, r32)
r5_matchHistoryCard.<init>(r3_str_matchHistoryCard, r6, r7, r8)
r1.add(r4_matchHistoryCardIndex, r5_matchHistoryCard)
Lb0_showGameCards:
java.util.List r5_gamesList = r35_profileState.getGames()
java.util.Iterator r5_gamesIterator = r5_gamesList.iterator()
Lb8:
boolean r6_hasNext = r5_gamesIterator.hasNext()
r7_false = 0
if (!r6_hasNext) goto Lcb_noNextItem
java.lang.Object r6_Item = r5_gamesIterator.next()
r8_gameItem = r6_Item
com.riotgames.shared.profile.Game r8_gameItem = (com.riotgames.shared.profile.Game) r8_gameItem
boolean r8_isGameItemLolGame = r8_gameItem instanceof com.riotgames.shared.profile.LolGame
if (!r8_isGameItemLolGame) goto Lb8
goto Lcc_gameItemIsLolGame
Lcb_noNextItem:
r6_hasNext = r7_false
Lcc_gameItemIsLolGame:
boolean r5 = r6 instanceof com.riotgames.shared.profile.LolGame
if (r5 == 0) goto Ld3
com.riotgames.shared.profile.LolGame r6 = (com.riotgames.shared.profile.LolGame) r6
goto Ld4
Ld3:
r6 = r7
Ld4:
if (r6 != 0) goto Ld7
goto Lf2
Ld7:
java.util.List r5 = r6.getTopChampions()
boolean r5 = r5.isEmpty()
r5 = r5 ^ r4 // boolean exponent ????? r4 here is 1 prob
if (r5 == 0) goto Lf2
com.riotgames.mobile.profile.ui.MatchHistoryCard r5 = new com.riotgames.mobile.profile.ui.MatchHistoryCard
java.lang.String r8 = r35_profileState.getPuuid()
boolean r9 = r35_profileState.getShouldHighlightHistory()
r5.<init>(r3, r8, r9, r6)
r1.add(r4, r5)
Lf2:
java.util.List r3 = r35_profileState.getOtherActions()
boolean r5 = r3 instanceof java.util.Collection
if (r5 == 0) goto L102
boolean r5 = r3.isEmpty()
if (r5 == 0) goto L102
L100:
r3 = r2
goto L117
L102:
java.util.Iterator r3 = r3.iterator()
L106:
boolean r5 = r3.hasNext()
if (r5 == 0) goto L100
java.lang.Object r5 = r3.next()
com.riotgames.shared.profile.Action r5 = (com.riotgames.shared.profile.Action) r5
boolean r5 = r5 instanceof com.riotgames.shared.profile.Action.SetBuddyNote
if (r5 == 0) goto L106
r3 = r4
L117:
if (r3 != 0) goto L11b
if (r36 == 0) goto L12d
L11b:
com.riotgames.mobile.profile.ui.BuddyNoteCard r3 = new com.riotgames.mobile.profile.ui.BuddyNoteCard
java.lang.String r5 = r35_profileState.getBuddyNote()
if (r5 != 0) goto L125
java.lang.String r5 = ""
L125:
java.lang.String r8 = "buddy-note-card"
r3.<init>(r8, r5)
r1.add(r4, r3)
L12d:
java.util.List r3 = r35_profileState.getOtherActions()
boolean r5 = r3 instanceof java.util.Collection
if (r5 == 0) goto L13d
boolean r5 = r3.isEmpty()
if (r5 == 0) goto L13d
L13b:
r3 = r2
goto L152
L13d:
java.util.Iterator r3 = r3.iterator()
L141:
boolean r5 = r3.hasNext()
if (r5 == 0) goto L13b
java.lang.Object r5 = r3.next()
com.riotgames.shared.profile.Action r5 = (com.riotgames.shared.profile.Action) r5
boolean r5 = r5 instanceof com.riotgames.shared.profile.Action.SetStatus
if (r5 == 0) goto L141
r3 = r4
L152:
if (r3 != 0) goto L156
if (r37 == 0) goto L164
L156:
com.riotgames.mobile.profile.ui.StatusCard r3 = new com.riotgames.mobile.profile.ui.StatusCard
java.lang.String r5 = r35_profileState.getStatus()
java.lang.String r8 = "profile-status-card"
r3.<init>(r8, r5)
r1.add(r4, r3)
L164:
java.util.List r3 = r35_profileState.getGames()
boolean r3 = r3.isEmpty()
r3 = r3 ^ r4
if (r3 == 0) goto L1d6
java.util.List r0 = r35_profileState.getGames()
java.util.ArrayList r3 = new java.util.ArrayList
r3.<init>()
java.util.Iterator r0 = r0.iterator()
L17c:
boolean r5 = r0.hasNext()
if (r5 == 0) goto L1af
java.lang.Object r5 = r0.next()
r8 = r5
com.riotgames.shared.profile.Game r8 = (com.riotgames.shared.profile.Game) r8
com.riotgames.shared.core.riotsdk.Product r8 = r8.getType()
com.riotgames.shared.core.riotsdk.Product r9 = com.riotgames.shared.core.riotsdk.Product.LEAGUE_OF_LEGENDS
if (r8 != r9) goto L1a8
if (r6 != 0) goto L195
L193:
r8 = r2
goto L1a4
L195:
java.util.List r8 = r6.getTopChampions()
if (r8 != 0) goto L19c
goto L193
L19c:
boolean r8 = r8.isEmpty()
r8 = r8 ^ r4
if (r8 != r4) goto L193
r8 = r4
L1a4:
if (r8 == 0) goto L1a8
r8 = r4
goto L1a9
L1a8:
r8 = r2
L1a9:
if (r8 != 0) goto L17c
r3.add(r5)
goto L17c
L1af:
java.util.ArrayList r0 = new java.util.ArrayList
r2 = 10
int r2 = a.b.e0.a.a.H(r3, r2)
r0.<init>(r2)
java.util.Iterator r2 = r3.iterator()
L1be:
boolean r3 = r2.hasNext()
if (r3 == 0) goto L1d3
java.lang.Object r3 = r2.next()
com.riotgames.shared.profile.Game r3 = (com.riotgames.shared.profile.Game) r3
com.riotgames.mobile.profile.ui.GameCard r5 = new com.riotgames.mobile.profile.ui.GameCard
r5.<init>(r3)
r0.add(r5)
goto L1be
L1d3:
r1.addAll(r0)
L1d6:
boolean r0 = r1.isEmpty()
r0 = r0 ^ r4
if (r0 == 0) goto L1ed
r0 = r33
com.riotgames.mobile.profile.ui.ProfileCardAdapter r2 = r0.profileCardAdapter
if (r2 == 0) goto L1e7
r2.submitList(r1)
goto L1ef
L1e7:
java.lang.String r1 = "profileCardAdapter"
m.c0.c.Intrinsics.o(r1)
throw r7
L1ed:
r0 = r33
L1ef:
return
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment