Skip to content
Snippets Groups Projects
Commit 8f924dc7 authored by Jason Salyers's avatar Jason Salyers
Browse files

Merge branch 'jsalyers-decentralized-updates' into 'develop'

[JES] Few bug fixes for decentralized list system. Prevents the reset_all...

See merge request !215
parents 0cbcb81f 592e6c78
No related branches found
No related tags found
2 merge requests!216Develop,!215[JES] Few bug fixes for decentralized list system. Prevents the reset_all...
...@@ -256,7 +256,7 @@ class ListManagement extends React.Component { ...@@ -256,7 +256,7 @@ class ListManagement extends React.Component {
dismiss_intro() { dismiss_intro() {
//Subscribes them to blacklist and mute list of the hive.blog account //Subscribes them to blacklist and mute list of the hive.blog account
this.setState({ expand_welcome_panel: false, first_time_user: false }); this.setState({ expand_welcome_panel: false, first_time_user: false });
this.handle_reset_list(true); this.handle_reset_list();
} }
broadcastFollowOperation() { broadcastFollowOperation() {
...@@ -399,7 +399,7 @@ class ListManagement extends React.Component { ...@@ -399,7 +399,7 @@ class ListManagement extends React.Component {
this.setState({ account_filter: event.target.value, start_index: 0 }); this.setState({ account_filter: event.target.value, start_index: 0 });
} }
handle_reset_list(reset_all) { handle_reset_list() {
if (this.state.is_busy) { if (this.state.is_busy) {
console.log(tt('list_management_jsx.busy')); console.log(tt('list_management_jsx.busy'));
return; return;
...@@ -423,16 +423,18 @@ class ListManagement extends React.Component { ...@@ -423,16 +423,18 @@ class ListManagement extends React.Component {
return; return;
} }
if (reset_all) what = 'reset_all_lists';
let follower = this.props.username; let follower = this.props.username;
let following = 'all'; //there is an 'all' account, but it appears unused so i'm stealing their identity for this let following = 'all'; //there is an 'all' account, but it appears unused so i'm stealing their identity for this
this.setState({ is_busy: true }); this.setState({ is_busy: true });
this.props.updateList(follower, following, what, () => { if (what !== '') {
setTimeout(() => { this.props.updateList(follower, following, what, () => {
this.follow_hive_blog_lists(); setTimeout(() => {
}, 5000); this.follow_hive_blog_lists();
}); }, 5000);
});
} else {
this.follow_hive_blog_lists();
}
} }
follow_hive_blog_lists() { follow_hive_blog_lists() {
...@@ -441,11 +443,10 @@ class ListManagement extends React.Component { ...@@ -441,11 +443,10 @@ class ListManagement extends React.Component {
let what = 'follow_muted'; let what = 'follow_muted';
this.props.updateList(follower, following, what, () => { this.props.updateList(follower, following, what, () => {
setTimeout(() => { setTimeout(() => {
//[JES] Uncomment after hivemind follow bug gets fixed let what = 'follow_blacklist';
//let what = 'follow_blacklist'; this.props.updateList(follower, following, what, () => {});
//this.props.updateList(follower, following, what, () => {});
this.setState({ is_busy: false, updates_are_pending: false }); this.setState({ is_busy: false, updates_are_pending: false });
//this.get_accounts_from_api(); this.get_accounts_from_api();
}, 1000); }, 1000);
}); });
} }
...@@ -793,10 +794,7 @@ class ListManagement extends React.Component { ...@@ -793,10 +794,7 @@ class ListManagement extends React.Component {
<h5> <h5>
<b>{tt('list_management_jsx.reset_header')}</b> <b>{tt('list_management_jsx.reset_header')}</b>
</h5> </h5>
<span <span className="button slim hollow secondary" onClick={this.handle_reset_list.bind(this)}>
className="button slim hollow secondary"
onClick={this.handle_reset_list.bind(this, false)}
>
{this.state.is_busy ? tt('list_management_jsx.button_busy') : reset_button_text} {this.state.is_busy ? tt('list_management_jsx.button_busy') : reset_button_text}
</span> </span>
<span <span
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment