Merge pull request #750 from deathbeam/remove-unnecessary-flag
Remove unnecessary chatCommandsEnabled from config
This commit is contained in:
@@ -48,7 +48,6 @@ import net.runelite.api.MessageNode;
|
|||||||
import net.runelite.api.Varbits;
|
import net.runelite.api.Varbits;
|
||||||
import net.runelite.api.events.ResizeableChanged;
|
import net.runelite.api.events.ResizeableChanged;
|
||||||
import net.runelite.api.events.VarbitChanged;
|
import net.runelite.api.events.VarbitChanged;
|
||||||
import net.runelite.client.config.RuneLiteConfig;
|
|
||||||
|
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Singleton
|
@Singleton
|
||||||
@@ -57,16 +56,14 @@ public class ChatMessageManager
|
|||||||
private final Map<ChatMessageType, Set<ChatColor>> colorCache = new HashMap<>();
|
private final Map<ChatMessageType, Set<ChatColor>> colorCache = new HashMap<>();
|
||||||
private final Provider<Client> clientProvider;
|
private final Provider<Client> clientProvider;
|
||||||
private final ScheduledExecutorService executor;
|
private final ScheduledExecutorService executor;
|
||||||
private final RuneLiteConfig config;
|
|
||||||
private int transparancyVarbit = -1;
|
private int transparancyVarbit = -1;
|
||||||
private final Queue<QueuedMessage> queuedMessages = new ConcurrentLinkedQueue<>();
|
private final Queue<QueuedMessage> queuedMessages = new ConcurrentLinkedQueue<>();
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
public ChatMessageManager(Provider<Client> clientProvider, ScheduledExecutorService executor, RuneLiteConfig config)
|
public ChatMessageManager(Provider<Client> clientProvider, ScheduledExecutorService executor)
|
||||||
{
|
{
|
||||||
this.clientProvider = clientProvider;
|
this.clientProvider = clientProvider;
|
||||||
this.executor = executor;
|
this.executor = executor;
|
||||||
this.config = config;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Subscribe
|
@Subscribe
|
||||||
@@ -146,8 +143,8 @@ public class ChatMessageManager
|
|||||||
final boolean transparent = client.isResized() && client.getSetting(Varbits.TRANSPARANT_CHATBOX) != 0;
|
final boolean transparent = client.isResized() && client.getSetting(Varbits.TRANSPARANT_CHATBOX) != 0;
|
||||||
final Set<ChatColor> chatColors = colorCache.get(target.getType());
|
final Set<ChatColor> chatColors = colorCache.get(target.getType());
|
||||||
|
|
||||||
// If we do not have any colors cached or recoloring is disabled, simply set clean message
|
// If we do not have any colors cached, simply set clean message
|
||||||
if (!config.chatCommandsRecolorEnabled() || chatColors == null || chatColors.isEmpty())
|
if (chatColors == null || chatColors.isEmpty())
|
||||||
{
|
{
|
||||||
target.setValue(target.getRuneLiteFormatMessage());
|
target.setValue(target.getRuneLiteFormatMessage());
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -43,16 +43,6 @@ public interface RuneLiteConfig extends Config
|
|||||||
return new Dimension(765, 503);
|
return new Dimension(765, 503);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ConfigItem(
|
|
||||||
keyName = "chatCommandsRecolorEnabled",
|
|
||||||
name = "Enable chat commands recolor",
|
|
||||||
description = "Determines if recoloring of custom RuneLite chat commands is enabled"
|
|
||||||
)
|
|
||||||
default boolean chatCommandsRecolorEnabled()
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@ConfigItem(
|
@ConfigItem(
|
||||||
keyName = "uiEnableCustomChrome",
|
keyName = "uiEnableCustomChrome",
|
||||||
name = "Enable custom window chrome",
|
name = "Enable custom window chrome",
|
||||||
|
|||||||
Reference in New Issue
Block a user