Skip to content

Commit

Permalink
release: fixes
Browse files Browse the repository at this point in the history
### Fixes

- Page will refresh when a social media account is added.
- Instant sharing checkbox will now be selected when "Instant sharing by default" is active
  • Loading branch information
Soare-Robert-Daniel authored Feb 20, 2024
2 parents 43af841 + 0f07156 commit 1d30808
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 19 deletions.
3 changes: 1 addition & 2 deletions includes/admin/class-rop-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -796,8 +796,7 @@ public function publish_now_attributes( $default ) {
global $post;

if ( in_array( $post->post_status, array( 'future', 'publish' ), true ) ) {
$default['action'] = 'yes' === get_post_meta( $post->ID, 'rop_publish_now', true );
$default['instant_share_by_default'] = $default['action'];
$default['action'] = 'yes' === get_post_meta( $post->ID, 'rop_publish_now', true );
}
$default['page_active_accounts'] = get_post_meta( $post->ID, 'rop_publish_now_accounts', true );

Expand Down
57 changes: 40 additions & 17 deletions vue/src/vue-elements/sign-in-btn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
viewBox="0 0 512 512"
fill="currentColor"
>
<!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc.-->
<!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2023 Fonticons, Inc. -->
<path d="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z" />
</svg>
</i>
Expand Down Expand Up @@ -570,9 +570,12 @@ export default {
updateState: false,
data: data
}).then(response => {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
window.location.reload();
try {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
} finally {
window.location.reload();
}
}, error => {
this.is_loading = false;
Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error)
Expand All @@ -589,8 +592,8 @@ export default {
updateState: false,
data: data
}).then(response => {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
try {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close(); // Sometimes this throws an error because of cross-origin frame.
} catch(e) {
// nothing to do
Expand All @@ -613,9 +616,14 @@ export default {
updateState: false,
data: data
}).then(response => {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
window.location.reload();
try {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
} catch(e) {
// nothing to do
} finally {
window.location.reload();
}
}, error => {
this.is_loading = false;
Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error)
Expand All @@ -632,9 +640,14 @@ export default {
updateState: false,
data: data
}).then(response => {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
window.location.reload();
try {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
} catch(e) {
// nothing to do
} finally {
window.location.reload();
}
}, error => {
this.is_loading = false;
Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error)
Expand All @@ -651,9 +664,14 @@ export default {
updateState: false,
data: data
}).then(response => {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
window.location.reload();
try {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
} catch(e) {
// nothing to do
} finally {
window.location.reload();
}
}, error => {
this.is_loading = false;
Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error)
Expand All @@ -670,9 +688,14 @@ export default {
updateState: false,
data: data
}).then(response => {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
window.location.reload();
try {
window.removeEventListener("message", event => this.getChildWindowMessage(event));
this.authPopupWindow.close();
} catch(e) {
// nothing to do
} finally {
window.location.reload();
}
}, error => {
this.is_loading = false;
Vue.$log.error('Got nothing from server. Prompt user to check internet connection and try again', error)
Expand Down

0 comments on commit 1d30808

Please sign in to comment.