mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Revert "Add "retry all" option to synchronisation page"
This reverts commit 15daaa16fd
.
This commit is contained in:
parent
cffc919791
commit
4c3d37b311
@ -55,8 +55,6 @@ class StatusScreenComponent extends React.Component {
|
||||
height: style.height - theme.headerHeight - containerPadding * 2,
|
||||
});
|
||||
|
||||
let retryHandlers = [];
|
||||
|
||||
function renderSectionTitleHtml(key, title) {
|
||||
return (
|
||||
<h2 key={`section_${key}`} style={theme.h2Style}>
|
||||
@ -83,8 +81,6 @@ class StatusScreenComponent extends React.Component {
|
||||
this.resfreshScreen();
|
||||
};
|
||||
|
||||
retryHandlers.push(item.retryHandler);
|
||||
|
||||
retryLink = (
|
||||
<a href="#" onClick={onClick} style={retryStyle}>
|
||||
{_('Retry')}
|
||||
@ -109,24 +105,6 @@ class StatusScreenComponent extends React.Component {
|
||||
return <div key={key}>{itemsHtml}</div>;
|
||||
};
|
||||
|
||||
function renderRetryAllHtml() {
|
||||
let retryAllLink = null;
|
||||
if (retryHandlers.length > 1) {
|
||||
const onClick = async () => {
|
||||
await Promise.all(retryHandlers.map(handler => handler()));
|
||||
this.resfreshScreen();
|
||||
};
|
||||
retryAllLink = (
|
||||
<div>
|
||||
<a href="#" onClick={onClick} style={retryStyle}>
|
||||
{_('Retry All')}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
return retryAllLink;
|
||||
}
|
||||
|
||||
function renderBodyHtml(report) {
|
||||
let sectionsHtml = [];
|
||||
|
||||
@ -136,14 +114,7 @@ class StatusScreenComponent extends React.Component {
|
||||
sectionsHtml.push(renderSectionHtml(i, section));
|
||||
}
|
||||
|
||||
let retryAllHtml = renderRetryAllHtml(); // must be called after renderSectionHtml
|
||||
|
||||
return (
|
||||
<div>
|
||||
{retryAllHtml}
|
||||
{sectionsHtml}
|
||||
</div>
|
||||
);
|
||||
return <div>{sectionsHtml}</div>;
|
||||
}
|
||||
|
||||
let body = renderBodyHtml(this.state.report);
|
||||
|
Loading…
Reference in New Issue
Block a user