Procurement-PoE / Procurement

Path Of Exile Character & Stash Management Tool
Artistic License 2.0
331 stars 133 forks source link

Automatically refresh used tab when log file changes #1042

Closed thailyn closed 5 years ago

thailyn commented 5 years ago

This PR accomplishes two things: 1) Add a class that monitors the client log file for changes, and reads new content when it has. When it finds log messages indicating the player's character has changed locations, it triggers an event. 2) Add a handler for this event that refreshes all the user's used tabs. This only happens at most ever two minutes.

Both of these behaviors are disabled by default. The former is disabled when the config value ClientLogFileLocation, which should point to the log file, is missing or empty; or if the config value EnableClientLogFileMonitoring is missing or false. The latter is disabled when the config value EnableTabRefreshOnLocationChanged is missing or false.