Skip to content

Commit

Permalink
fix(parser): ensure overlay unhides after resuming combat
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenChrysus committed Jun 11, 2024
1 parent bbf397f commit 75f0a4b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 12 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 1.7.1

**Released: 2024-06-11**

### Bug Fixes
- Resolved issue where overlay did not unhide after auto-hiding and resuming combat

### Features
- N/A

### UI Changes
- N/A

### Code Changes
- N/A

### Miscellaneous
- N/A

## 1.7.0

**Released: 2024-06-09**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ffxiv-ember-overlay",
"description": "React + Redux overlay for the OverlayPlugin and ACTWebSocket plugins for Advanced Combat Tracker for use with Final Fantasy XIV.",
"license": "GPL-3.0-only",
"version": "1.7.0",
"version": "1.7.1",
"keywords": [
"ffxiv",
"endwalker",
Expand Down
27 changes: 16 additions & 11 deletions src/components/Parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,20 @@ class Parser extends React.Component {
visible = false;
}

if (!visible) {
if (this.props.auto_hide === "hide") {
if (this.state.visible !== visible) {
this.setState({
visible,
last_activity : this.props.last_activity,
});
}
} else if (this.props.auto_hide.startsWith("minimize_")) {
const location = this.props.auto_hide.substring(9);
if (this.props.auto_hide === "hide") {
if (this.state.visible !== visible) {
this.setState({
visible,
last_activity : this.props.last_activity,
});
}
} else if (this.props.auto_hide.startsWith("minimize_")) {
const location = this.props.auto_hide.substring(9);

if (!this.props.toggles[location] && this.props.last_activity !== this.state.minimized_last_activity) {
if (this.props.last_activity !== this.state.minimized_last_activity) {
if (visible) {
this.props.autoHideRestore(location);
} else {
this.setState({ minimized_last_activity : this.props.last_activity });
this.props.autoHideMinimize(location);
}
Expand Down Expand Up @@ -165,6 +167,9 @@ const mapDispatchToProps = dispatch => ({
autoHideMinimize(location) {
dispatch(updateToggle({ location, enabled : true }));
},
autoHideRestore(location) {
dispatch(updateToggle({ location, enabled : false }));
},
});

const mapStateToProps = state => ({
Expand Down

0 comments on commit 75f0a4b

Please sign in to comment.