From 25fbbfaf9448e7b5943a227439ba0a4720e21f60 Mon Sep 17 00:00:00 2001 From: Stypox Date: Thu, 25 Jul 2019 01:07:51 +0200 Subject: [PATCH] Rename action to defaultAction in StreamDialogEntry To improve readability --- .../java/org/schabi/newpipe/util/StreamDialogEntry.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java index 1b503dbbb..4ccd66f0d 100644 --- a/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java +++ b/app/src/main/java/org/schabi/newpipe/util/StreamDialogEntry.java @@ -50,7 +50,7 @@ public enum StreamDialogEntry { } private final int resource; - private final StreamDialogEntryAction action; + private final StreamDialogEntryAction defaultAction; private StreamDialogEntryAction customAction; private static StreamDialogEntry[] enabledEntries; @@ -60,9 +60,9 @@ public enum StreamDialogEntry { // non-static methods to initialize and edit entries // /////////////////////////////////////////////////////// - StreamDialogEntry(final int resource, StreamDialogEntryAction action) { + StreamDialogEntry(final int resource, StreamDialogEntryAction defaultAction) { this.resource = resource; - this.action = action; + this.defaultAction = defaultAction; this.customAction = null; } @@ -101,7 +101,7 @@ public enum StreamDialogEntry { public static void clickOn(int which, Fragment fragment, StreamInfoItem infoItem) { if (enabledEntries[which].customAction == null) { - enabledEntries[which].action.onClick(fragment, infoItem); + enabledEntries[which].defaultAction.onClick(fragment, infoItem); } else { enabledEntries[which].customAction.onClick(fragment, infoItem); }