Commit eda22724 authored by Ahmed Ashour's avatar Ahmed Ashour Committed by skylot

chore: use functional interface instead of ISettingsUpdater (PR #548)

parent 207ce6cb
package jadx.gui.settings;
public interface ISettingsUpdater {
void update(JadxSettings settings);
}
......@@ -13,6 +13,7 @@ import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.function.Consumer;
import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import org.jetbrains.annotations.Nullable;
......@@ -67,9 +68,9 @@ public class JadxSettings extends JadxCLIArgs {
JadxSettingsAdapter.store(this);
}
public void partialSync(ISettingsUpdater updater) {
private void partialSync(Consumer<JadxSettings> updater) {
JadxSettings settings = JadxSettingsAdapter.load();
updater.update(settings);
updater.accept(settings);
JadxSettingsAdapter.store(settings);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment