Skip to content

Commit

Permalink
refactor: Merge duplicate switch case branch
Browse files Browse the repository at this point in the history
  • Loading branch information
hasrat-ali committed May 9, 2022
1 parent 11dcd27 commit 040cd2f
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions app/src/main/java/mod/agus/jcoderz/editor/event/ManageEvent.java
Original file line number Diff line number Diff line change
Expand Up @@ -1527,14 +1527,12 @@ public static String i(String targetId, String eventName) {
return "When " + targetId + " " + eventName + " %d.value";

case "onPatternLockProgress":
case "onPatternLockComplete":
return "When " + targetId + " " + eventName + " %m.listStr.pattern";

case "onOptionsItemSelected":
return "When " + targetId + " %d.id %s.title";

case "onPatternLockComplete":
return "When " + targetId + " " + eventName + " %m.listStr.pattern";

case "onTabSelected":
case "onTabUnselected":
case "onTabReselected":
Expand Down Expand Up @@ -1565,17 +1563,17 @@ public static String i(String targetId, String eventName) {

case "onBannerAdFailedToLoad":
case "onInterstitialAdFailedToLoad":
return targetId + ": onAdFailedToLoad %d.errorCode %s.errorMessage";
case "onRewardAdFailedToLoad":
case "onAdFailedToShowFullScreenContent":
return targetId + ": " + eventName + " %d.errorCode %s.errorMessage";

case "onInterstitialAdLoaded":
case "onBannerAdLoaded":
return targetId + ": onAdLoaded";

case "onAdFailedToShowFullScreenContent":
return targetId + ": " + eventName + " %d.errorCode %s.errorMessage";

case "onAdDismissedFullScreenContent":
case "onAdShowedFullScreenContent":
case "onRewardAdLoaded":
return targetId + ": " + eventName;

case "onBannerAdOpened":
Expand All @@ -1587,12 +1585,6 @@ public static String i(String targetId, String eventName) {
case "onBannerAdClosed":
return targetId + ": onAdClosed";

case "onRewardAdLoaded":
return targetId + ": " + eventName + "";

case "onRewardAdFailedToLoad":
return targetId + ": " + eventName + " %d.errorCode %s.errorMessage";

default:
return EventsHandler.getSpec(targetId, eventName);
}
Expand Down

0 comments on commit 040cd2f

Please sign in to comment.