Guest User

JVApiManager

a guest
May 11th, 2024
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 48.24 KB | Source Code | 0 0
  1. package p382s3;
  2.  
  3. import android.content.Context;
  4. import android.os.Bundle;
  5. import android.text.TextUtils;
  6. import android.util.Log;
  7. import com.google.common.primitives.Ints;
  8. import com.google.firebase.perf.network.FirebasePerfOkHttpClient;
  9. import com.google.gson.JsonSyntaxException;
  10. import com.jeuxvideo.api.utils.JVGsonConverter;
  11. import com.jeuxvideo.api.web.JVApiService;
  12. import com.jeuxvideo.models.api.AssetCallback;
  13. import com.jeuxvideo.models.api.JVCallback;
  14. import com.jeuxvideo.models.api.ads.SponsoWrapperWrapper;
  15. import com.jeuxvideo.models.api.comment.UserComment;
  16. import com.jeuxvideo.models.api.common.JVBean;
  17. import com.jeuxvideo.models.api.forum.Forum;
  18. import com.jeuxvideo.models.api.forum.Topic;
  19. import com.jeuxvideo.models.api.games.Game;
  20. import com.jeuxvideo.models.api.news.News;
  21. import com.jeuxvideo.models.api.report.Report;
  22. import com.jeuxvideo.models.api.review.AbstractReview;
  23. import com.jeuxvideo.models.api.user.Favorites;
  24. import com.jeuxvideo.models.api.user.Machines;
  25. import com.jeuxvideo.models.api.user.NewsLetters;
  26. import com.jeuxvideo.models.api.user.Page;
  27. import com.jeuxvideo.models.api.user.Profile;
  28. import com.jeuxvideo.models.api.user.User;
  29. import com.jeuxvideo.models.api.user.UserLogin;
  30. import com.jeuxvideo.models.api.user.UserRegister;
  31. import com.jeuxvideo.models.api.user.UserValidate;
  32. import com.jeuxvideo.models.events.api.AssetLoadEvent;
  33. import com.jeuxvideo.models.events.api.JVActionEvent;
  34. import com.jeuxvideo.models.events.api.SentRequestEvent;
  35. import com.jeuxvideo.models.interfaces.IUserText;
  36. import java.io.File;
  37. import okhttp3.MediaType;
  38. import okhttp3.OkHttpClient;
  39. import okhttp3.Request;
  40. import okhttp3.RequestBody;
  41. import org.greenrobot.eventbus.ThreadMode;
  42. import retrofit2.Call;
  43. import sb.C17827c;
  44. import sb.Subscribe;
  45.  
  46. /* renamed from: s3.f */
  47. /* loaded from: /home/alex/Téléchargements/com.jeuxvideo-deobfuscated/classes5.dex */
  48. public class JVApiManager {
  49.  
  50.     /* renamed from: d */
  51.     private static final String f37111d = "f";
  52.  
  53.     /* renamed from: e */
  54.     private static final MediaType f37112e = MediaType.parse("application/octet-stream");
  55.  
  56.     /* renamed from: a */
  57.     private final Context f37113a;
  58.  
  59.     /* renamed from: b */
  60.     private JVApiService f37114b;
  61.  
  62.     /* renamed from: c */
  63.     private final OkHttpClient f37115c;
  64.  
  65.     public JVApiManager(Context context, JVApiService jVApiService, OkHttpClient okHttpClient) {
  66.         this.f37113a = context.getApplicationContext();
  67.         this.f37114b = jVApiService;
  68.         this.f37115c = okHttpClient;
  69.     }
  70.  
  71.     /* renamed from: a */
  72.     private String m5945a(JVActionEvent jVActionEvent) {
  73.         int i = jVActionEvent.getData().getInt("id", -1);
  74.         if (i == -1) {
  75.             return User.ME_PARAM;
  76.         }
  77.         return Integer.toString(i);
  78.     }
  79.  
  80.     /* renamed from: b */
  81.     private int m5944b(JVActionEvent jVActionEvent) {
  82.         Bundle data = jVActionEvent.getData();
  83.         if (data == null) {
  84.             return 0;
  85.         }
  86.         return data.getInt(JVBean.BEAN_ID, 0);
  87.     }
  88.  
  89.     /* renamed from: c */
  90.     private void m5943c(JVActionEvent jVActionEvent) {
  91.         if (Ints.contains(C17805a.f37106c, jVActionEvent.getScreen())) {
  92.             C17805a m5965b = C17805a.m5965b(this.f37113a);
  93.             Object obj = null;
  94.             if (jVActionEvent.getClassType() != null && jVActionEvent.getCacheKey() != null) {
  95.                 String m5963e = C17805a.m5963e(jVActionEvent.getScreen(), jVActionEvent.getCacheKey().intValue());
  96.                 String mo5960f = m5965b.mo5960f(m5963e);
  97.                 if (!TextUtils.isEmpty(mo5960f)) {
  98.                     try {
  99.                         obj = JVGsonConverter.m27186i(this.f37113a).fromJson(mo5960f, (Class<Object>) jVActionEvent.getClassType());
  100.                     } catch (JsonSyntaxException e) {
  101.                         Log.w(f37111d, "Error while trying to deserialize from cache", e);
  102.                         m5965b.mo5959g(m5963e);
  103.                     }
  104.                 }
  105.             }
  106.             if (obj == null) {
  107.                 String str = f37111d;
  108.                 Log.i(str, "No cached version for event : '" + jVActionEvent + "'");
  109.                 return;
  110.             }
  111.             String str2 = f37111d;
  112.             Log.i(str2, "A cached version of '" + jVActionEvent + "' exists.");
  113.             C17827c.m5883d().m5873n(obj);
  114.         }
  115.     }
  116.  
  117.     /* JADX WARN: Can't fix incorrect switch cases order, some code will duplicate */
  118.     /* JADX WARN: Code restructure failed: missing block: B:274:0x06f6, code lost:
  119.         if (r4.equals(com.jeuxvideo.models.api.games.Game.IMAGES_ARTIFACT) == false) goto L217;
  120.      */
  121.     /* JADX WARN: Code restructure failed: missing block: B:49:0x0159, code lost:
  122.         if (r7.equals(com.jeuxvideo.models.api.comment.UserComment.UPDATE_COMMENT_ARTIFACT) == false) goto L41;
  123.      */
  124.     /* JADX WARN: Code restructure failed: missing block: B:95:0x02cf, code lost:
  125.         if (r4.equals(com.jeuxvideo.models.api.report.Report.ACCOUNT_ARTIFACT) == false) goto L82;
  126.      */
  127.     /* JADX WARN: Removed duplicated region for block: B:301:0x07f4  */
  128.     @Subscribe(threadMode = ThreadMode.ASYNC)
  129.     /*
  130.         Code decompiled incorrectly, please refer to instructions dump.
  131.     */
  132.     public final void callApi(JVActionEvent jVActionEvent) {
  133.         String str;
  134.         Call<SponsoWrapperWrapper> contentList;
  135.         String string;
  136.         String string2;
  137.         String string3;
  138.         String string4;
  139.         String string5;
  140.         char c;
  141.         Call deleteFavorisForum;
  142.         String string6;
  143.         String string7;
  144.         int i;
  145.         boolean z;
  146.         Integer num;
  147.         Integer num2;
  148.         m5943c(jVActionEvent);
  149.         char c2 = 0;
  150.         if (jVActionEvent.canUseETag()) {
  151.             str = C17805a.m5965b(this.f37113a).mo5960f(C17805a.m5963e(jVActionEvent.getScreen(), 0));
  152.         } else {
  153.             str = null;
  154.         }
  155.         JVCallback jVCallback = new JVCallback(this.f37113a, jVActionEvent);
  156.         Bundle data = jVActionEvent.getData();
  157.         String excludedMachines = jVActionEvent.getExcludedMachines();
  158.         String selectedMachine = jVActionEvent.getSelectedMachine();
  159.         if (TextUtils.isEmpty(selectedMachine)) {
  160.             selectedMachine = "any";
  161.         }
  162.         int screen = jVActionEvent.getScreen();
  163.         if (screen != 120) {
  164.             if (screen != 121) {
  165.                 switch (screen) {
  166.                     case 0:
  167.                         contentList = this.f37114b.config(str);
  168.                         break;
  169.                     case 1:
  170.                         contentList = this.f37114b.getHeadlineList(excludedMachines, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  171.                         break;
  172.                     case 2:
  173.                         contentList = this.f37114b.getContentList(jVActionEvent.getCategories(), jVActionEvent.getTypes(), null, excludedMachines, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  174.                         break;
  175.                     case 3:
  176.                         if (data == null) {
  177.                             string = null;
  178.                         } else {
  179.                             string = data.getString("artifact");
  180.                         }
  181.                         if (string == null) {
  182.                             contentList = this.f37114b.getNews(m5944b(jVActionEvent));
  183.                             break;
  184.                         } else {
  185.                             if (string.equals(News.NEWS_ARTIFACT)) {
  186.                                 contentList = this.f37114b.getRelatedNews(m5944b(jVActionEvent), jVActionEvent.getPage(), jVActionEvent.getPerPage());
  187.                                 break;
  188.                             }
  189.                             contentList = null;
  190.                             break;
  191.                         }
  192.                     case 4:
  193.                         contentList = this.f37114b.getContentList(jVActionEvent.getCategories(), jVActionEvent.getTypes(), jVActionEvent.getEvents(), excludedMachines, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  194.                         break;
  195.                     case 5:
  196.                         contentList = this.f37114b.getVideo(m5944b(jVActionEvent));
  197.                         break;
  198.                     case 6:
  199.                         contentList = this.f37114b.getRelatedVideos(m5944b(jVActionEvent), jVActionEvent.getPage(), jVActionEvent.getPerPage());
  200.                         break;
  201.                     case 7:
  202.                         contentList = this.f37114b.getVideoList(jVActionEvent.getCategories(), jVActionEvent.getShow(), excludedMachines, jVActionEvent.getTypes(), jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  203.                         break;
  204.                     case 8:
  205.                         contentList = this.f37114b.getChroniclesSummary(excludedMachines);
  206.                         break;
  207.                     case 9:
  208.                         contentList = this.f37114b.getVideosSummary(excludedMachines);
  209.                         break;
  210.                     case 10:
  211.                         if (data == null) {
  212.                             string2 = null;
  213.                         } else {
  214.                             string2 = data.getString("artifact");
  215.                         }
  216.                         if (string2 == null) {
  217.                             contentList = this.f37114b.getArticle(m5944b(jVActionEvent));
  218.                             break;
  219.                         } else {
  220.                             if (TextUtils.equals(string2, "wikis")) {
  221.                                 contentList = this.f37114b.getRelatedWikis(m5944b(jVActionEvent), jVActionEvent.getPage(), jVActionEvent.getPerPage());
  222.                                 break;
  223.                             }
  224.                             contentList = null;
  225.                             break;
  226.                         }
  227.                     case 11:
  228.                         contentList = this.f37114b.getArticleList(excludedMachines, jVActionEvent.getPage(), jVActionEvent.getPerPage(), String.valueOf(55), str);
  229.                         break;
  230.                     case 12:
  231.                         contentList = this.f37114b.getArticleList(excludedMachines, jVActionEvent.getPage(), jVActionEvent.getPerPage(), String.valueOf(56), str);
  232.                         break;
  233.                     default:
  234.                         String str2 = "";
  235.                         String str3 = User.ME_PARAM;
  236.                         switch (screen) {
  237.                             case 14:
  238.                                 int m5944b = m5944b(jVActionEvent);
  239.                                 if (data == null) {
  240.                                     string3 = null;
  241.                                 } else {
  242.                                     string3 = data.getString("artifact");
  243.                                 }
  244.                                 if (string3 == null) {
  245.                                     contentList = this.f37114b.getGame(m5944b, selectedMachine);
  246.                                     break;
  247.                                 } else {
  248.                                     switch (string3.hashCode()) {
  249.                                         case -1185250696:
  250.                                             break;
  251.                                         case -816678056:
  252.                                             if (string3.equals("videos")) {
  253.                                                 c2 = 1;
  254.                                                 break;
  255.                                             }
  256.                                             c2 = 65535;
  257.                                             break;
  258.                                         case -41509031:
  259.                                             if (string3.equals(Game.ADD_REVIEW_ARTIFACT)) {
  260.                                                 c2 = 2;
  261.                                                 break;
  262.                                             }
  263.                                             c2 = 65535;
  264.                                             break;
  265.                                         case 102970646:
  266.                                             if (string3.equals(Game.LIGHT_ARTIFACT)) {
  267.                                                 c2 = 3;
  268.                                                 break;
  269.                                             }
  270.                                             c2 = 65535;
  271.                                             break;
  272.                                         case 113133251:
  273.                                             if (string3.equals("wikis")) {
  274.                                                 c2 = 4;
  275.                                                 break;
  276.                                             }
  277.                                             c2 = 65535;
  278.                                             break;
  279.                                         case 798086608:
  280.                                             if (string3.equals(Game.USER_REVIEWS_ARTIFACT)) {
  281.                                                 c2 = 5;
  282.                                                 break;
  283.                                             }
  284.                                             c2 = 65535;
  285.                                             break;
  286.                                         case 1000972032:
  287.                                             if (string3.equals(Game.NEWS_ARTIFACT)) {
  288.                                                 c2 = 6;
  289.                                                 break;
  290.                                             }
  291.                                             c2 = 65535;
  292.                                             break;
  293.                                         case 1099953179:
  294.                                             if (string3.equals("reviews")) {
  295.                                                 c2 = 7;
  296.                                                 break;
  297.                                             }
  298.                                             c2 = 65535;
  299.                                             break;
  300.                                         case 1557721666:
  301.                                             if (string3.equals(Game.DETAILS_ARTIFACT)) {
  302.                                                 c2 = '\b';
  303.                                                 break;
  304.                                             }
  305.                                             c2 = 65535;
  306.                                             break;
  307.                                         case 1765413312:
  308.                                             if (string3.equals(Game.SINGLE_REVIEW_ARTIFACT)) {
  309.                                                 c2 = '\t';
  310.                                                 break;
  311.                                             }
  312.                                             c2 = 65535;
  313.                                             break;
  314.                                         default:
  315.                                             c2 = 65535;
  316.                                             break;
  317.                                     }
  318.                                     switch (c2) {
  319.                                         case 0:
  320.                                             contentList = this.f37114b.getGameImages(m5944b, selectedMachine, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  321.                                             break;
  322.                                         case 1:
  323.                                             contentList = this.f37114b.getGameVideos(m5944b, selectedMachine, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  324.                                             break;
  325.                                         case 2:
  326.                                             contentList = this.f37114b.addReview(m5944b, selectedMachine, (AbstractReview.Body) data.getParcelable(AbstractReview.REVIEW));
  327.                                             break;
  328.                                         case 3:
  329.                                             contentList = this.f37114b.getLightGame(m5944b, selectedMachine);
  330.                                             break;
  331.                                         case 4:
  332.                                             contentList = this.f37114b.getGameWikis(m5944b, selectedMachine, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  333.                                             break;
  334.                                         case 5:
  335.                                             contentList = this.f37114b.getGameUserReviews(m5944b, selectedMachine, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  336.                                             break;
  337.                                         case 6:
  338.                                             contentList = this.f37114b.getGameNews(m5944b, selectedMachine, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  339.                                             break;
  340.                                         case 7:
  341.                                             if (jVActionEvent.getSelectedMachine() == null) {
  342.                                                 contentList = this.f37114b.getGameReviews(m5944b);
  343.                                                 break;
  344.                                             } else {
  345.                                                 contentList = this.f37114b.getGameReviews(m5944b, selectedMachine);
  346.                                                 break;
  347.                                             }
  348.                                         case '\b':
  349.                                             contentList = this.f37114b.getGameDetails(m5944b, selectedMachine);
  350.                                             break;
  351.                                         case '\t':
  352.                                             contentList = this.f37114b.getGameReview(m5944b, selectedMachine, data.getInt("id"));
  353.                                             break;
  354.                                         default:
  355.                                             contentList = null;
  356.                                             break;
  357.                                     }
  358.                                 }
  359.                             case 15:
  360.                                 if (data == null) {
  361.                                     string4 = null;
  362.                                 } else {
  363.                                     string4 = data.getString("month");
  364.                                 }
  365.                                 if (data == null) {
  366.                                     string5 = null;
  367.                                 } else {
  368.                                     string5 = data.getString("year");
  369.                                 }
  370.                                 contentList = this.f37114b.getGameReleaseList(string4, string5, excludedMachines, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  371.                                 break;
  372.                             case 16:
  373.                                 contentList = this.f37114b.getGameList("trending", excludedMachines, null, null, null, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  374.                                 break;
  375.                             case 17:
  376.                                 contentList = this.f37114b.getGameList("awaited", excludedMachines, null, null, null, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  377.                                 break;
  378.                             case 18:
  379.                                 contentList = this.f37114b.getGameSummary(excludedMachines);
  380.                                 break;
  381.                             case 19:
  382.                                 contentList = this.f37114b.getContentList(null, "74", null, null, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  383.                                 break;
  384.                             case 20:
  385.                                 contentList = this.f37114b.search(jVActionEvent.getStringData());
  386.                                 break;
  387.                             case 21:
  388.                                 contentList = this.f37114b.searchAutocomplete(jVActionEvent.getStringData());
  389.                                 break;
  390.                             case 22:
  391.                                 contentList = this.f37114b.searchGames(jVActionEvent.getStringData(), jVActionEvent.getPage(), jVActionEvent.getPerPage());
  392.                                 break;
  393.                             case 23:
  394.                                 contentList = this.f37114b.searchNews(jVActionEvent.getStringData(), jVActionEvent.getPage(), jVActionEvent.getPerPage());
  395.                                 break;
  396.                             case 24:
  397.                                 contentList = this.f37114b.searchArticles(jVActionEvent.getStringData(), jVActionEvent.getPage(), jVActionEvent.getPerPage());
  398.                                 break;
  399.                             case 25:
  400.                                 contentList = this.f37114b.searchVideos(jVActionEvent.getStringData(), jVActionEvent.getPage(), jVActionEvent.getPerPage());
  401.                                 break;
  402.                             case 26:
  403.                                 contentList = this.f37114b.searchWikis(jVActionEvent.getStringData(), jVActionEvent.getPage(), jVActionEvent.getPerPage());
  404.                                 break;
  405.                             case 27:
  406.                                 contentList = this.f37114b.login((UserLogin) jVActionEvent.getParcelableData());
  407.                                 break;
  408.                             case 28:
  409.                                 contentList = this.f37114b.reinitPassword((UserLogin) jVActionEvent.getParcelableData());
  410.                                 break;
  411.                             case 29:
  412.                                 contentList = this.f37114b.logout();
  413.                                 break;
  414.                             case 30:
  415.                                 String string8 = data.getString("token");
  416.                                 contentList = this.f37114b.register((UserRegister) data.getParcelable(UserRegister.BUNDLE_KEY), string8);
  417.                                 break;
  418.                             case 31:
  419.                             case 32:
  420.                                 if (jVActionEvent.getScreen() != 31) {
  421.                                     str3 = m5945a(jVActionEvent);
  422.                                 }
  423.                                 contentList = this.f37114b.getAccount(str3);
  424.                                 break;
  425.                             case 33:
  426.                                 contentList = this.f37114b.validateAccount((UserValidate) jVActionEvent.getParcelableData());
  427.                                 break;
  428.                             case 34:
  429.                                 contentList = this.f37114b.uploadAvatar(RequestBody.create(f37112e, (File) jVActionEvent.getSerializableData()));
  430.                                 break;
  431.                             case 35:
  432.                                 contentList = this.f37114b.uploadCover(RequestBody.create(f37112e, (File) jVActionEvent.getSerializableData()));
  433.                                 break;
  434.                             case 36:
  435.                                 String m5945a = m5945a(jVActionEvent);
  436.                                 if (data != null) {
  437.                                     str2 = data.getString("artifact", "");
  438.                                 }
  439.                                 str2.hashCode();
  440.                                 switch (str2.hashCode()) {
  441.                                     case -2035746319:
  442.                                         if (str2.equals(Favorites.FORUM_REMOVE_ARTIFACT)) {
  443.                                             c = 0;
  444.                                             break;
  445.                                         }
  446.                                         c = 65535;
  447.                                         break;
  448.                                     case -1768273120:
  449.                                         if (str2.equals(Favorites.GAMES_ALL_ARTIFACT)) {
  450.                                             c = 1;
  451.                                             break;
  452.                                         }
  453.                                         c = 65535;
  454.                                         break;
  455.                                     case -1724546052:
  456.                                         if (str2.equals("description")) {
  457.                                             c = 2;
  458.                                             break;
  459.                                         }
  460.                                         c = 65535;
  461.                                         break;
  462.                                     case -1268770958:
  463.                                         if (str2.equals("forums")) {
  464.                                             c = 3;
  465.                                             break;
  466.                                         }
  467.                                         c = 65535;
  468.                                         break;
  469.                                     case -1074482200:
  470.                                         if (str2.equals(Profile.FAVORIS_ARTIFACT)) {
  471.                                             c = 4;
  472.                                             break;
  473.                                         }
  474.                                         c = 65535;
  475.                                         break;
  476.                                     case -868034268:
  477.                                         if (str2.equals(Favorites.TOPIC_ARTIFACT)) {
  478.                                             c = 5;
  479.                                             break;
  480.                                         }
  481.                                         c = 65535;
  482.                                         break;
  483.                                     case -195635377:
  484.                                         if (str2.equals(Favorites.GAME_ADD_ARTIFACT)) {
  485.                                             c = 6;
  486.                                             break;
  487.                                         }
  488.                                         c = 65535;
  489.                                         break;
  490.                                     case -185121524:
  491.                                         if (str2.equals("machines")) {
  492.                                             c = 7;
  493.                                             break;
  494.                                         }
  495.                                         c = 65535;
  496.                                         break;
  497.                                     case 98120385:
  498.                                         if (str2.equals("games")) {
  499.                                             c = '\b';
  500.                                             break;
  501.                                         }
  502.                                         c = 65535;
  503.                                         break;
  504.                                     case 125770998:
  505.                                         if (str2.equals(Profile.EXCLUDED_MACHINES_ARTIFACT)) {
  506.                                             c = '\t';
  507.                                             break;
  508.                                         }
  509.                                         c = 65535;
  510.                                         break;
  511.                                     case 585102102:
  512.                                         if (str2.equals(Favorites.GAME_REMOVE_ARTIFACT)) {
  513.                                             c = '\n';
  514.                                             break;
  515.                                         }
  516.                                         c = 65535;
  517.                                         break;
  518.                                     case 703351807:
  519.                                         if (str2.equals(Favorites.TOPIC_REMOVE_ARTIFACT)) {
  520.                                             c = 11;
  521.                                             break;
  522.                                         }
  523.                                         c = 65535;
  524.                                         break;
  525.                                     default:
  526.                                         c = 65535;
  527.                                         break;
  528.                                 }
  529.                                 switch (c) {
  530.                                     case 0:
  531.                                         deleteFavorisForum = this.f37114b.deleteFavorisForum(m5945a, new Forum.Ids(data.getIntArray(Topic.Ids.KEY)));
  532.                                         break;
  533.                                     case 1:
  534.                                         deleteFavorisForum = this.f37114b.getAllFavorisGames(m5945a);
  535.                                         break;
  536.                                     case 2:
  537.                                         deleteFavorisForum = this.f37114b.saveDescription(new Profile.SaveDesc(data.getString("description")));
  538.                                         break;
  539.                                     case 3:
  540.                                         deleteFavorisForum = this.f37114b.getFavorisForum(m5945a, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  541.                                         break;
  542.                                     case 4:
  543.                                         deleteFavorisForum = this.f37114b.getFavoris(m5945a);
  544.                                         break;
  545.                                     case 5:
  546.                                         deleteFavorisForum = this.f37114b.getFavorisTopics(m5945a, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  547.                                         break;
  548.                                     case 6:
  549.                                         deleteFavorisForum = this.f37114b.addFavorisGames(m5945a, new Game.Keys(data.getParcelableArrayList(Game.Keys.KEY)));
  550.                                         break;
  551.                                     case 7:
  552.                                         int[] intArray = data.getIntArray("machines");
  553.                                         if (intArray == null) {
  554.                                             intArray = new int[0];
  555.                                         }
  556.                                         deleteFavorisForum = this.f37114b.saveMachines(new Machines(intArray));
  557.                                         break;
  558.                                     case '\b':
  559.                                         deleteFavorisForum = this.f37114b.getFavorisGames(m5945a, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  560.                                         break;
  561.                                     case '\t':
  562.                                         int[] intArray2 = data.getIntArray("machines");
  563.                                         if (intArray2 == null) {
  564.                                             intArray2 = new int[0];
  565.                                         }
  566.                                         deleteFavorisForum = this.f37114b.saveExcludedMachines(new Machines(intArray2));
  567.                                         break;
  568.                                     case '\n':
  569.                                         deleteFavorisForum = this.f37114b.deleteFavorisGames(m5945a, new Game.Keys(data.getParcelableArrayList(Game.Keys.KEY)));
  570.                                         break;
  571.                                     case 11:
  572.                                         deleteFavorisForum = this.f37114b.deleteFavorisTopics(m5945a, new Topic.Ids(data.getIntArray(Topic.Ids.KEY)));
  573.                                         break;
  574.                                     default:
  575.                                         deleteFavorisForum = this.f37114b.getProfile(m5945a);
  576.                                         break;
  577.                                 }
  578.                                 contentList = deleteFavorisForum;
  579.                                 break;
  580.                             case 37:
  581.                                 String m5945a2 = m5945a(jVActionEvent);
  582.                                 if (data == null) {
  583.                                     string6 = null;
  584.                                 } else {
  585.                                     string6 = data.getString("artifact", "");
  586.                                 }
  587.                                 string6.hashCode();
  588.                                 if (!string6.equals(Page.CONTENTS_ARTIFACT)) {
  589.                                     if (!string6.equals("reviews")) {
  590.                                         deleteFavorisForum = this.f37114b.getProfilePage(m5945a2);
  591.                                     } else {
  592.                                         deleteFavorisForum = this.f37114b.getPageReviews(m5945a2, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  593.                                     }
  594.                                 } else {
  595.                                     deleteFavorisForum = this.f37114b.getPageContents(m5945a2, jVActionEvent.getPage(), jVActionEvent.getPerPage());
  596.                                 }
  597.                                 contentList = deleteFavorisForum;
  598.                                 break;
  599.                             case 38:
  600.                                 contentList = this.f37114b.getCaptcha(jVActionEvent.getIntData());
  601.                                 break;
  602.                             default:
  603.                                 switch (screen) {
  604.                                     case 40:
  605.                                         int m5944b2 = m5944b(jVActionEvent);
  606.                                         if (data == null) {
  607.                                             string7 = null;
  608.                                         } else {
  609.                                             string7 = data.getString("artifact");
  610.                                         }
  611.                                         if (data == null) {
  612.                                             i = 0;
  613.                                         } else {
  614.                                             i = data.getInt(IUserText.USER_TEXT_ID);
  615.                                         }
  616.                                         if (data != null && data.getBoolean(Report.ADD_REPORT)) {
  617.                                             z = true;
  618.                                         } else {
  619.                                             z = false;
  620.                                         }
  621.                                         if (string7 != null) {
  622.                                             switch (string7.hashCode()) {
  623.                                                 case -409481308:
  624.                                                     break;
  625.                                                 case 1090323161:
  626.                                                     if (string7.equals(Report.REVIEW_ARTIFACT)) {
  627.                                                         c2 = 1;
  628.                                                         break;
  629.                                                     }
  630.                                                     c2 = 65535;
  631.                                                     break;
  632.                                                 case 1536033714:
  633.                                                     if (string7.equals(Report.COMMENT_ARTIFACT)) {
  634.                                                         c2 = 2;
  635.                                                         break;
  636.                                                     }
  637.                                                     c2 = 65535;
  638.                                                     break;
  639.                                                 default:
  640.                                                     c2 = 65535;
  641.                                                     break;
  642.                                             }
  643.                                             switch (c2) {
  644.                                                 case 0:
  645.                                                     if (z) {
  646.                                                         deleteFavorisForum = this.f37114b.reportAccount(String.valueOf(m5944b2), (Report) data.getParcelable(Report.REPORT));
  647.                                                     } else {
  648.                                                         deleteFavorisForum = this.f37114b.getCurrentAccountReport(String.valueOf(m5944b2));
  649.                                                     }
  650.                                                     contentList = deleteFavorisForum;
  651.                                                     break;
  652.                                                 case 1:
  653.                                                     if (z) {
  654.                                                         deleteFavorisForum = this.f37114b.reportReview(m5944b2, selectedMachine, i, (Report) data.getParcelable(Report.REPORT));
  655.                                                     } else {
  656.                                                         deleteFavorisForum = this.f37114b.getCurrentReviewReport(m5944b2, selectedMachine, i);
  657.                                                     }
  658.                                                     contentList = deleteFavorisForum;
  659.                                                     break;
  660.                                                 case 2:
  661.                                                     if (z) {
  662.                                                         deleteFavorisForum = this.f37114b.reportComment(String.valueOf(m5944b2), String.valueOf(i), (Report) data.getParcelable(Report.REPORT));
  663.                                                     } else {
  664.                                                         deleteFavorisForum = this.f37114b.getCurrentCommentReport(String.valueOf(m5944b2), String.valueOf(i));
  665.                                                     }
  666.                                                     contentList = deleteFavorisForum;
  667.                                                     break;
  668.                                             }
  669.                                         }
  670.                                         contentList = null;
  671.                                         break;
  672.                                     case 41:
  673.                                         contentList = this.f37114b.getStores(m5944b(jVActionEvent), selectedMachine);
  674.                                         break;
  675.                                     case 42:
  676.                                         int m5944b3 = m5944b(jVActionEvent);
  677.                                         UserComment.Body body = new UserComment.Body(data.getString(UserComment.Body.COMMENT_CONTENT));
  678.                                         if (data.containsKey(UserComment.COMMENT_ID)) {
  679.                                             num = Integer.valueOf(data.getInt(UserComment.COMMENT_ID));
  680.                                         } else {
  681.                                             num = null;
  682.                                         }
  683.                                         if (num != null) {
  684.                                             contentList = this.f37114b.addReply(String.valueOf(m5944b3), String.valueOf(num), body);
  685.                                             break;
  686.                                         } else {
  687.                                             contentList = this.f37114b.addComment(String.valueOf(m5944b3), body);
  688.                                             break;
  689.                                         }
  690.                                     case 43:
  691.                                         int m5944b4 = m5944b(jVActionEvent);
  692.                                         Integer valueOf = Integer.valueOf(data.getInt(UserComment.COMMENT_ID));
  693.                                         contentList = this.f37114b.addCommentVote(String.valueOf(m5944b4), String.valueOf(valueOf), UserComment.Vote.upVote());
  694.                                         break;
  695.                                     case 44:
  696.                                         contentList = this.f37114b.deleteCommentVote(String.valueOf(m5944b(jVActionEvent)), String.valueOf(Integer.valueOf(data.getInt(UserComment.COMMENT_ID))));
  697.                                         break;
  698.                                     case 45:
  699.                                         int m5944b5 = m5944b(jVActionEvent);
  700.                                         Integer valueOf2 = Integer.valueOf(data.getInt(UserComment.COMMENT_ID));
  701.                                         contentList = this.f37114b.addCommentVote(String.valueOf(m5944b5), String.valueOf(valueOf2), UserComment.Vote.downVote());
  702.                                         break;
  703.                                     case 46:
  704.                                         contentList = this.f37114b.getComments(String.valueOf(m5944b(jVActionEvent)), jVActionEvent.getPage(), jVActionEvent.getPerPage());
  705.                                         break;
  706.                                     case 47:
  707.                                         contentList = this.f37114b.getCommentAnswers(String.valueOf(m5944b(jVActionEvent)), String.valueOf(Integer.valueOf(data.getInt(UserComment.COMMENT_ID))));
  708.                                         break;
  709.                                     case 48:
  710.                                         contentList = this.f37114b.getTopsComments(String.valueOf(m5944b(jVActionEvent)));
  711.                                         break;
  712.                                     case 49:
  713.                                         int m5944b6 = m5944b(jVActionEvent);
  714.                                         if (data.containsKey(UserComment.COMMENT_ID)) {
  715.                                             num2 = Integer.valueOf(data.getInt(UserComment.COMMENT_ID));
  716.                                         } else {
  717.                                             num2 = null;
  718.                                         }
  719.                                         String string9 = data.getString("artifact");
  720.                                         if (string9 == null) {
  721.                                             contentList = this.f37114b.getComment(String.valueOf(m5944b6), String.valueOf(num2));
  722.                                             break;
  723.                                         } else {
  724.                                             switch (string9.hashCode()) {
  725.                                                 case -545552042:
  726.                                                     break;
  727.                                                 case 619337713:
  728.                                                     if (string9.equals(UserComment.RESTORE_COMMENT_ARTIFACT)) {
  729.                                                         c2 = 1;
  730.                                                         break;
  731.                                                     }
  732.                                                     c2 = 65535;
  733.                                                     break;
  734.                                                 case 745626164:
  735.                                                     if (string9.equals(UserComment.DELETE_COMMENT_ARTIFACT)) {
  736.                                                         c2 = 2;
  737.                                                         break;
  738.                                                     }
  739.                                                     c2 = 65535;
  740.                                                     break;
  741.                                                 default:
  742.                                                     c2 = 65535;
  743.                                                     break;
  744.                                             }
  745.                                             switch (c2) {
  746.                                                 case 0:
  747.                                                     contentList = this.f37114b.updateComment(String.valueOf(m5944b6), String.valueOf(num2), new UserComment.Body(data.getString(UserComment.Body.COMMENT_CONTENT)));
  748.                                                     break;
  749.                                                 case 1:
  750.                                                     contentList = this.f37114b.restoreComment(String.valueOf(m5944b6), String.valueOf(num2), "");
  751.                                                     break;
  752.                                                 case 2:
  753.                                                     contentList = this.f37114b.deleteComment(String.valueOf(m5944b6), String.valueOf(num2));
  754.                                                     break;
  755.                                             }
  756.                                         }
  757.                                         break;
  758.                                     case 50:
  759.                                         contentList = this.f37114b.getContentList(null, "59,63, 78", null, null, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  760.                                         break;
  761.                                     case 51:
  762.                                         contentList = this.f37114b.getArticleList(excludedMachines, jVActionEvent.getPage(), jVActionEvent.getPerPage(), "76", str);
  763.                                         break;
  764.                                     case 52:
  765.                                         contentList = this.f37114b.getArticleList(excludedMachines, jVActionEvent.getPage(), jVActionEvent.getPerPage(), "77", str);
  766.                                         break;
  767.                                     case 53:
  768.                                         contentList = this.f37114b.getTechList(jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  769.                                         break;
  770.                                     case 54:
  771.                                         contentList = this.f37114b.sponso(str);
  772.                                         String str4 = f37111d;
  773.                                         Log.i(str4, "Nothing to do with this event : " + jVActionEvent);
  774.                                         break;
  775.                                     default:
  776.                                         switch (screen) {
  777.                                             case 301:
  778.                                                 contentList = this.f37114b.updateNewsLettersStatus(User.ME_PARAM, (NewsLetters) data.getParcelable(NewsLetters.PARTNERS_KEY));
  779.                                                 break;
  780.                                             case 302:
  781.                                                 contentList = this.f37114b.updateNewsLettersStatus(User.ME_PARAM, (NewsLetters) data.getParcelable(NewsLetters.EDITORIAL_KEY));
  782.                                                 break;
  783.                                             case 303:
  784.                                                 contentList = this.f37114b.getNewsLettersStatus(User.ME_PARAM);
  785.                                                 break;
  786.                                             default:
  787.                                                 contentList = null;
  788.                                                 String str42 = f37111d;
  789.                                                 Log.i(str42, "Nothing to do with this event : " + jVActionEvent);
  790.                                                 break;
  791.                                         }
  792.                                 }
  793.                         }
  794.                 }
  795.             } else {
  796.                 contentList = this.f37114b.getContentList(null, "63", null, null, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  797.             }
  798.         } else {
  799.             contentList = this.f37114b.getContentList(null, "54", null, excludedMachines, jVActionEvent.getPage(), jVActionEvent.getPerPage(), str);
  800.         }
  801.         if (contentList != null) {
  802.             contentList.enqueue(jVCallback);
  803.         }
  804.         C17827c.m5883d().m5873n(new SentRequestEvent(jVActionEvent));
  805.     }
  806.  
  807.     @Subscribe(threadMode = ThreadMode.BACKGROUND)
  808.     public final void loadAsset(AssetLoadEvent assetLoadEvent) {
  809.         if (assetLoadEvent.getAsset() != null && assetLoadEvent.getAsset().getUrl() != null) {
  810.             FirebasePerfOkHttpClient.enqueue(this.f37115c.newCall(new Request.Builder().url(assetLoadEvent.getAsset().getUrl()).build()), new AssetCallback(this.f37113a, assetLoadEvent));
  811.         }
  812.     }
  813.  
  814.     @Subscribe(threadMode = ThreadMode.ASYNC)
  815.     public final void updateApiService(JVApiService jVApiService) {
  816.         this.f37114b = jVApiService;
  817.     }
  818. }
Advertisement
Add Comment
Please, Sign In to add comment